cplusplus-to-python / docker-compose.yml
DxCode's picture
intial commit
868eab0
Raw
History Blame Contribute Delete
1.1 kB
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "8000:8000"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=5)",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
environment:
# Inside Docker Compose, localhost would point at the frontend container.
# The backend service is reachable by its Compose service name instead.
TRANSLATE_API_URL: http://backend:8000/translate
ports:
- "8501:8501"
depends_on:
backend:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8501/_stcore/health', timeout=5)",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s