37 lines
958 B
YAML
37 lines
958 B
YAML
services:
|
|
api:
|
|
build:
|
|
context: .
|
|
target: api
|
|
environment:
|
|
schedule_link: ${schedule_link}
|
|
SCHEDULE_CACHE_TTL: ${SCHEDULE_CACHE_TTL:-900}
|
|
ports:
|
|
- "${API_PORT:-8000}:8000"
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/groups', timeout=5)"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
target: frontend
|
|
environment:
|
|
SCHEDULE_API: ${SCHEDULE_API:-http://api:8000}
|
|
ports:
|
|
- "${FRONTEND_PORT:-8080}:8080"
|
|
restart: unless-stopped
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/', timeout=5)"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|