52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
|
|
services:
|
||
|
|
api:
|
||
|
|
build: .
|
||
|
|
container_name: fitos-api
|
||
|
|
ports:
|
||
|
|
- "9002:9002"
|
||
|
|
environment:
|
||
|
|
DATABASE_URL: postgresql://fitos:fitos@db:5432/fitos
|
||
|
|
PORT: 9002
|
||
|
|
NODE_ENV: production
|
||
|
|
JWT_ACCESS_SECRET: ${JWT_ACCESS_SECRET:?set JWT_ACCESS_SECRET in .env}
|
||
|
|
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:?set JWT_REFRESH_SECRET in .env}
|
||
|
|
FITOS_FIRST_ADMIN_EMAIL: ${FITOS_FIRST_ADMIN_EMAIL:-admin@fitos.local}
|
||
|
|
FITOS_FIRST_ADMIN_PASSWORD: ${FITOS_FIRST_ADMIN_PASSWORD:-ChangeMe123!}
|
||
|
|
LOG_LEVEL: ${LOG_LEVEL:-info}
|
||
|
|
COOKIE_SECURE: ${COOKIE_SECURE:-false}
|
||
|
|
UPLOAD_DIR: /app/uploads
|
||
|
|
volumes:
|
||
|
|
- fitos_uploads:/app/uploads
|
||
|
|
depends_on:
|
||
|
|
db:
|
||
|
|
condition: service_healthy
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:9002/health"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
start_period: 30s
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
db:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
container_name: fitos-db
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: fitos
|
||
|
|
POSTGRES_PASSWORD: fitos
|
||
|
|
POSTGRES_DB: fitos
|
||
|
|
volumes:
|
||
|
|
- fitos_pgdata:/var/lib/postgresql/data
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U fitos -d fitos"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
fitos_pgdata:
|
||
|
|
fitos_uploads:
|