services: learning-hub: image: python:3.11-slim container_name: learning-hub working_dir: /app volumes: - .:/app - /var/run/docker.sock:/var/run/docker.sock - /home:/home:ro command: > sh -c "pip install fastapi uvicorn sqlalchemy psutil docker && python -m app.main" networks: - proxy-net labels: - "traefik.enable=true" # Public (HTTPS) - "traefik.http.routers.learning.rule=Host(`learning.arch-services.mywire.org`)" - "traefik.http.routers.learning.entrypoints=websecure" - "traefik.http.routers.learning.tls=true" - "traefik.http.routers.learning.service=learning-svc" # Public (Redirect) - "traefik.http.routers.learning-red.rule=Host(`learning.arch-services.mywire.org`)" - "traefik.http.routers.learning-red.entrypoints=web" - "traefik.http.routers.learning-red.middlewares=https-redirect@docker" - "traefik.http.services.learning-svc.loadbalancer.server.port=8000" networks: proxy-net: external: true