Files
ubi-dan-itam/.env.example
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

22 lines
1.2 KiB
Bash

# Local dev Postgres connection string — matches docker-compose.yml's `db`
# service (POSTGRES_USER/POSTGRES_PASSWORD/POSTGRES_DB there must stay in
# sync with this). Copy this file to `.env` (gitignored) and adjust if
# needed.
#
# The hostname `db` only resolves from containers attached to the
# `asset-license-mgmt-net` Docker network that docker-compose.yml creates —
# see CLAUDE.md's "Môi trường" section for the exact docker compose/run
# commands used to run the app and tests on this Windows host.
DATABASE_URL=postgres://asset_license_mgmt:change-me-local-dev@db:5432/asset_license_mgmt
# Auth.js v5 (next-auth@beta) — required. Random value used to sign/encrypt
# session JWTs. Generate one with `npx auth secret` (writes straight to
# .env/.env.local) or `openssl rand -base64 33`, then copy the value here.
# Do NOT reuse this placeholder — must be a real per-environment secret.
AUTH_SECRET=change-me-generate-a-real-secret
# Required for `next start` behind a reverse proxy (NPM) — without it,
# Auth.js rejects requests with UntrustedHost since the Host header comes
# from the proxy, not a browser connecting directly. Not needed for `next dev`.
AUTH_TRUST_HOST=true