Run database, backend, and frontend using the repository Docker Compose stack.
- Docker Desktop (or Docker Engine + Compose plugin)
- Ports available on host:
3000(frontend)3002(backend)5432(internal to container network unless exposed)
From repository root, create .env from the provided example:
copy .env.docker.example .envIf you are not on Windows:
cp .env.docker.example .envSet at least:
POSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDJWT_SECRET(minimum 32 characters recommended)
From repository root:
docker compose up --buildThis starts:
db(PostgreSQL)backend(Express + Prisma)frontend(Nginx serving React build)
- Frontend app:
http://localhost:3000 - Backend API from host:
http://localhost:3002
When using the browser app, requests go through frontend Nginx proxy:
/api/*on port3000is proxied to backend containerbackend:3001
On backend container startup, command includes:
npx prisma migrate deploy
That means existing migration files are automatically applied before backend starts serving requests.
- Open app:
http://localhost:3000 - Health endpoint via backend host port:
http://localhost:3002/api/health
Start in detached mode:
docker compose up -dView logs:
docker compose logs -fRestart one service:
docker compose restart backendStop and remove containers:
docker compose downStop and remove containers + named volumes:
docker compose down -v- Stop local processes using
3000or3002 - Or adjust port mappings in
docker-compose.yml
- Inspect logs:
docker compose logs backend - Check
JWT_SECRETand DB credentials in root.env - Ensure db is healthy and accepting connections
- Confirm backend container is running
- Confirm Nginx proxy route
/api/is active