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.

PropertyValue
Directoryapps/backend/upload
Port8018
Local URLhttps://local.reloop.sh/api/upload
Swagger UIhttps://local.reloop.sh/api/upload/openapi
StackElysiaJS 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

VariableRequiredDefault
PG_URLYESpostgresql://...
S3_ENDPOINTYEShttp://localhost:9010
S3_ACCESS_KEYYESreloop
S3_SECRET_KEYYESreloop123
S3_BUCKETYESreloop-uploads
PORTYES8018

Development Commands

CommandDescription
bun be:upload:devStart dev server with hot reloading
bun run --filter=upload buildCompile production bundle
bun run --filter=upload startRun compiled production build
bun run --filter=upload check-typesTypeScript type-check

Architecture

LayerDetail
StorageFiles uploaded to MinIO locally (localhost:9010), S3 in production.
MetadataFile index stored in Postgres (upload table).
Signed URLsGenerates presigned upload/download URLs for the dashboard.

Was this page helpful?

Edit this page