mirror of
https://github.com/sstent/AICyclingCoach.git
synced 2026-02-06 14:31:52 +00:00
sync
This commit is contained in:
54
docker-compose.yml
Normal file
54
docker-compose.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
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:
|
||||
Reference in New Issue
Block a user