Files

82 lines
2.0 KiB
YAML
Raw Permalink Normal View History

version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: boc-postgres
environment:
POSTGRES_USER: boc
POSTGRES_PASSWORD: ${DB_PASSWORD:-boc_secret_2026}
POSTGRES_DB: boc
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/db/migrations:/docker-entrypoint-initdb.d:ro
ports:
- "5435:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U boc"]
interval: 5s
timeout: 5s
retries: 5
networks:
- boc-network
redis:
image: redis:7-alpine
container_name: boc-redis
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
ports:
- "6381:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- boc-network
boc-api:
build:
context: ./backend
dockerfile: Dockerfile
container_name: boc-api
environment:
PORT: "9092"
DB_URL: "postgres://boc:${DB_PASSWORD:-boc_secret_2026}@postgres:5432/boc?sslmode=disable"
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET must be set}
AMOS_BASE_URL: "http://172.17.0.1:3250"
LEDGER_URL: "http://172.17.0.1:3250"
LEDGER_DB_URL: "postgres://boc:boc_secret_2026@postgres:5432/boc?sslmode=disable"
MIGRATIONS_DIR: "./db/migrations"
REDIS_URL: "redis://redis:6379"
RESEND_API_KEY: ${RESEND_API_KEY:-}
FROM_EMAIL: ${FROM_EMAIL:-noreply@landvex.com}
ports:
- "9096:9092"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./backend/db/migrations:/app/db/migrations:ro
- ./backend/auth:/app/auth:ro
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:9092/health >/dev/null 2>&1"]
interval: 10s
timeout: 5s
retries: 3
networks:
- boc-network
volumes:
postgres_data:
redis_data:
networks:
boc-network:
driver: bridge