Update docker-compose for production
This commit is contained in:
@@ -22,10 +22,10 @@ services:
|
|||||||
context: ./api
|
context: ./api
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: ${NODE_ENV:-development}
|
NODE_ENV: ${NODE_ENV:-production}
|
||||||
PORT: ${PORT:-8080}
|
PORT: ${PORT:-8080}
|
||||||
DATABASE_URL: ${DATABASE_URL:-postgres://app:app@postgres:5432/skymoney}
|
DATABASE_URL: ${DATABASE_URL:-postgres://app:app@postgres:5432/skymoney}
|
||||||
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:5173}
|
CORS_ORIGIN: ${CORS_ORIGIN:-https://skymoneybudget.com}
|
||||||
SEED_DEFAULT_BUDGET: ${SEED_DEFAULT_BUDGET:-0}
|
SEED_DEFAULT_BUDGET: ${SEED_DEFAULT_BUDGET:-0}
|
||||||
AUTH_DISABLED: ${AUTH_DISABLED:-false}
|
AUTH_DISABLED: ${AUTH_DISABLED:-false}
|
||||||
JWT_SECRET: ${JWT_SECRET:-dev-jwt-secret-change-me}
|
JWT_SECRET: ${JWT_SECRET:-dev-jwt-secret-change-me}
|
||||||
@@ -37,29 +37,12 @@ services:
|
|||||||
- "8081:8080"
|
- "8081:8080"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
# runs *inside* the container; port 8080 is the app's internal port
|
|
||||||
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"]
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 10
|
retries: 10
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
caddy:
|
|
||||||
image: caddy:2
|
|
||||||
ports:
|
|
||||||
- "8080:80"
|
|
||||||
volumes:
|
|
||||||
- ./Caddyfile.dev:/etc/caddy/Caddyfile:ro
|
|
||||||
- ./web/dist:/srv/site:ro
|
|
||||||
depends_on:
|
|
||||||
- api
|
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "wget -qO- http://localhost/ || exit 1"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 10
|
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
build:
|
build:
|
||||||
context: ./api
|
context: ./api
|
||||||
|
|||||||
Reference in New Issue
Block a user