34 lines
889 B
YAML
34 lines
889 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: mercury
|
|
POSTGRES_PASSWORD: mercury
|
|
POSTGRES_DB: mercury
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U mercury"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
DATABASE_URL: postgres://mercury:mercury@db:5432/mercury
|
|
JWT_SECRET: ${JWT_SECRET:-change_me_in_production}
|
|
JWT_EXPIRY_SECS: ${JWT_EXPIRY_SECS:-3600}
|
|
CACHE_MAX_CAPACITY: ${CACHE_MAX_CAPACITY:-10000}
|
|
CACHE_IDLE_TIMEOUT_SECS: ${CACHE_IDLE_TIMEOUT_SECS:-300}
|
|
CACHE_SWEEP_INTERVAL_SECS: ${CACHE_SWEEP_INTERVAL_SECS:-60}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
mem_limit: 512m
|
|
mem_reservation: 256m
|
|
|
|
volumes:
|
|
postgres_data:
|