Files
ubi-dan-itam/docker-compose.yml
T
toanhoangandClaude Sonnet 5 87e2cca019 feat: add Dockerfile + app service for production deploy
Adds a production Docker image (node:20-alpine) and an `app` service in
docker-compose.yml so the Next.js app can run as a long-lived container
instead of just build/test in ephemeral containers. Requires `apk add
openssl` before `npm ci`, otherwise Prisma silently picks the wrong query
engine binary on Alpine and only fails at runtime. Also wires
AUTH_TRUST_HOST=true, required by Auth.js when running behind the NPM
reverse proxy.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-02 08:25:25 -04:00

38 lines
995 B
YAML

services:
app:
build: .
container_name: asset-license-mgmt-app
env_file:
- .env
ports:
- "3002:3000"
depends_on:
- db
restart: unless-stopped
networks:
- asset-license-mgmt
db:
image: postgres:16-alpine
container_name: asset-license-mgmt-db
volumes:
- asset-license-mgmt-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=asset_license_mgmt
- POSTGRES_USER=asset_license_mgmt
- POSTGRES_PASSWORD=change-me-local-dev
# No host port published (same convention as xibo's cms-db) — this host
# already runs other projects' Postgres containers on 5432. Reach this
# service from other containers via the `asset-license-mgmt-net`
# network and the `db` hostname instead (see .env.example / CLAUDE.md).
restart: unless-stopped
networks:
- asset-license-mgmt
networks:
asset-license-mgmt:
name: asset-license-mgmt-net
volumes:
asset-license-mgmt-db-data: