feat: dockerize full stack (web + api + postgres)
- Multi-stage Dockerfiles for API (NestJS, prisma migrate on start) and web (Vite + nginx reverse proxy) - docker-compose.yml orchestrating db/api/web with healthcheck and persistent volumes - nginx proxies /api and /avatars to API; web built with relative API URL - scripts/docker-up.sh: ExFAT-safe wrapper that strips macOS AppleDouble (._*) sidecars before build - Conditionally register GoogleStrategy only when GOOGLE_CLIENT_ID is set - Fix unused-variable TS errors blocking production build
This commit is contained in:
27
.env.docker.example
Executable file
27
.env.docker.example
Executable file
@@ -0,0 +1,27 @@
|
||||
# Copy to .env.docker and edit before running:
|
||||
# cp .env.docker.example .env.docker
|
||||
# docker compose --env-file .env.docker up -d --build
|
||||
|
||||
# ---- Postgres ----
|
||||
POSTGRES_USER=tabungin
|
||||
POSTGRES_PASSWORD=change-me-strong-password
|
||||
POSTGRES_DB=tabungin
|
||||
|
||||
# ---- API ----
|
||||
# Generate a long random string, e.g.: openssl rand -base64 48
|
||||
JWT_SECRET=replace-with-a-long-random-secret
|
||||
|
||||
# Public URL where the web UI is served (used for CORS + OAuth callbacks)
|
||||
WEB_APP_URL=http://localhost:8080
|
||||
|
||||
# Host ports (change if something else is using these)
|
||||
WEB_PORT=8080
|
||||
API_PORT=3001
|
||||
|
||||
# ---- Optional integrations ----
|
||||
EXCHANGE_RATE_URL=https://api.exchangerate-api.com/v4/latest/IDR
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
GOOGLE_CALLBACK_URL=http://localhost:8080/api/auth/google/callback
|
||||
OTP_SEND_WEBHOOK_URL=
|
||||
OTP_SEND_WEBHOOK_URL_TEST=
|
||||
Reference in New Issue
Block a user