mirror of
https://github.com/sstent/AICyclingCoach.git
synced 2026-01-25 16:41:58 +00:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
version: '3.9'
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
volumes:
|
|
- gpx-data:/app/data/gpx
|
|
- garmin-sessions:/app/data/sessions
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DATABASE_URL=postgresql://postgres:password@db:5432/cycling
|
|
- GARMIN_USERNAME=${GARMIN_USERNAME}
|
|
- GARMIN_PASSWORD=${GARMIN_PASSWORD}
|
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
|
- AI_MODEL=${AI_MODEL:-claude-3-sonnet-20240229}
|
|
- API_KEY=${API_KEY}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 40s
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- REACT_APP_API_URL=http://localhost:8000
|
|
- REACT_APP_API_KEY=${API_KEY}
|
|
|
|
db:
|
|
image: postgres:15
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: cycling
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d cycling"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
gpx-data:
|
|
garmin-sessions:
|
|
postgres-data: |