53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=xcodereviewer
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./backend/uploads:/app/uploads
|
|
ports:
|
|
- "8000:8000"
|
|
env_file:
|
|
- ./backend/.env
|
|
environment:
|
|
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/xcodereviewer
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
environment:
|
|
- VITE_API_BASE_URL=http://localhost:8000/api/v1
|
|
depends_on:
|
|
- backend
|
|
command: npm run dev -- --host
|
|
|
|
volumes:
|
|
postgres_data:
|