50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: ten-minute-postgres
|
|
environment:
|
|
POSTGRES_DB: ten_minute_planner
|
|
POSTGRES_USER: planner
|
|
POSTGRES_PASSWORD: planner1234
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U planner -d ten_minute_planner"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
container_name: ten-minute-backend
|
|
environment:
|
|
PORT: 3001
|
|
DATABASE_URL: postgresql://planner:planner1234@postgres:5432/ten_minute_planner
|
|
CORS_ORIGIN: http://localhost:8080
|
|
SESSION_TTL_DAYS: 30
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
expose:
|
|
- "3001"
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
args:
|
|
VITE_API_BASE_URL: /api
|
|
container_name: ten-minute-frontend
|
|
depends_on:
|
|
- backend
|
|
ports:
|
|
- "8080:80"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|