64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
|
|
db:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_DB: vip_coordinator
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
redis:
|
|
image: redis:7
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
target: production
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:${DB_PASSWORD}@db:5432/vip_coordinator
|
|
REDIS_URL: redis://redis:6379
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
|
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI}
|
|
FRONTEND_URL: ${FRONTEND_URL}
|
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
|
PORT: 3000
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
target: production
|
|
args:
|
|
VITE_API_URL: ${VITE_API_URL}
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres-data:
|