64 lines
1.3 KiB
YAML
64 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: kooltab
|
|
POSTGRES_USER: kooltab
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U kooltab"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- kooltab-net
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: api
|
|
ports:
|
|
- "${API_PORT:-3001}:3001"
|
|
environment:
|
|
DATABASE_URL: "postgresql://kooltab:${DB_PASSWORD:-changeme}@postgres:5432/kooltab"
|
|
JWT_SECRET: "${JWT_SECRET}"
|
|
JWT_REFRESH_SECRET: "${JWT_REFRESH_SECRET}"
|
|
PORT: 3001
|
|
CORS_ORIGIN: "${DASHBOARD_URL:-http://localhost:3000}"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- kooltab-net
|
|
- scoobydoo
|
|
|
|
dashboard:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: dashboard
|
|
ports:
|
|
- "${DASHBOARD_PORT:-3000}:3000"
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: "${API_URL:-http://localhost:3001}/api/v1"
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
networks:
|
|
- kooltab-net
|
|
- scoobydoo
|
|
|
|
volumes:
|
|
pgdata:
|
|
|
|
networks:
|
|
kooltab-net:
|
|
driver: bridge
|
|
scoobydoo:
|
|
external: true |