first commit
This commit is contained in:
44
docker-compose.yml
Normal file
44
docker-compose.yml
Normal file
@ -0,0 +1,44 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
container_name: audio_engine_hub_app
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# Mount local app directory for hot-reloading in dev
|
||||
- ./app:/home/appuser/app
|
||||
# Mount models directory to provide models to the container
|
||||
- ./models:/home/appuser/models
|
||||
# Mount asset directory to persist generated audio files
|
||||
- ./asset:/home/appuser/asset
|
||||
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.app-router.rule=Host(`localhost`)"
|
||||
- "traefik.http.routers.app-router.entrypoints=web"
|
||||
- "traefik.http.services.app-service.loadbalancer.server.port=8000"
|
||||
networks:
|
||||
- web
|
||||
|
||||
traefik:
|
||||
image: "traefik:v2.10"
|
||||
container_name: traefik_proxy
|
||||
command:
|
||||
- "--api.dashboard=true"
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80"
|
||||
ports:
|
||||
- "80:80" # The HTTP port Traefik listens on
|
||||
- "8080:8080" # The Traefik Web UI (Dashboard)
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro" # Traefik needs access to the Docker daemon
|
||||
networks:
|
||||
- web
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: false
|
||||
Reference in New Issue
Block a user