Spaces:
Running
Running
| 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 | |