Upload
Set up, configure, and run the Reloop upload microservice locally.
Complete Base Setup First
Ensure you've finished the Setup and have MinIO running (bun docker:up).
Service Overview
File uploads — logos, attachments, and assets stored in MinIO/S3.
| Property | Value |
|---|---|
| Directory | apps/backend/upload |
| Port | 8018 |
| Local URL | https://local.reloop.sh/api/upload |
| Swagger UI | https://local.reloop.sh/api/upload/openapi |
| Stack | ElysiaJS PostgreSQL MinIO/S3 NATS |
Quick Start
Run from the monorepo root:
bun be:upload:dev
The service starts with hot reloading on port 8018.
Environment Configuration
Variables live in apps/backend/upload/.env. Running bun env:setup from the root auto-populates this file.
PG_URL=postgresql://reloop:reloop123@localhost:5432/reloop
REDIS_URL=redis://:reloop123@localhost:6379
PORT=8018
BASE_URL="https://local.reloop.sh"
S3_ENDPOINT=http://localhost:9010
S3_ACCESS_KEY=reloop
S3_SECRET_KEY=reloop123
S3_BUCKET=reloop-uploads
S3_REGION=us-east-1
S3_FORCE_PATH_STYLE=true
NATS_URL=nats://localhost:4222
NODE_ENV=development
Reference Table
| Variable | Required | Default |
|---|---|---|
PG_URL | YES | postgresql://... |
S3_ENDPOINT | YES | http://localhost:9010 |
S3_ACCESS_KEY | YES | reloop |
S3_SECRET_KEY | YES | reloop123 |
S3_BUCKET | YES | reloop-uploads |
PORT | YES | 8018 |
Development Commands
| Command | Description |
|---|---|
bun be:upload:dev | Start dev server with hot reloading |
bun run --filter=upload build | Compile production bundle |
bun run --filter=upload start | Run compiled production build |
bun run --filter=upload check-types | TypeScript type-check |
Architecture
| Layer | Detail |
|---|---|
| Storage | Files uploaded to MinIO locally (localhost:9010), S3 in production. |
| Metadata | File index stored in Postgres (upload table). |
| Signed URLs | Generates presigned upload/download URLs for the dashboard. |
Was this page helpful?