Spaces:
Sleeping
Sleeping
| version: '3.8' | |
| services: | |
| backend: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| ports: | |
| - "7860:7860" | |
| volumes: | |
| - ./default.env:/app/default.env | |
| environment: | |
| - HOST=0.0.0.0 | |
| restart: unless-stopped | |
| # Optional explicitly decoupled frontend override if developers | |
| # want hot-reloading native modules running parallel to the backend container. | |
| frontend-dev: | |
| image: node:18-alpine | |
| working_dir: /app/frontend | |
| volumes: | |
| - ./frontend:/app/frontend | |
| - /app/frontend/node_modules | |
| ports: | |
| - "5173:5173" | |
| command: sh -c "npm install && npm run dev -- --host" | |
| depends_on: | |
| - backend | |
| # Note: If you just want the production frontend statically served, | |
| # you do not need to run this service; the backend service handles it automatically. | |