batman
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in New Issue
Block a user