Files
flowsint/docker-compose.override.yml
2025-04-04 17:08:43 +02:00

99 lines
2.3 KiB
YAML

name: flowsint
services:
# Traefik reverse proxy
reverse-proxy:
image: traefik:v3.1
container_name: traefik-reverse-proxy
command:
- "--api.insecure=true"
- "--providers.docker"
- "--entrypoints.ws.address=:80"
- "--providers.file.watch=true"
- "--entryPoints.websecure.address=:443"
- "--entrypoints.websecure.http.tls.certresolver=myresolver"
- "--providers.file.filename=/etc/traefik/dynamic.yml"
ports:
- "80:80"
- "443:443"
- "8080:8080"
restart: unless-stopped
volumes:
- ./certs:/etc/traefik/certs
- ./dynamic.yml:/etc/traefik/dynamic.yml
- /var/run/docker.sock:/var/run/docker.sock
networks:
- traefik
# Next.js application
web:
build:
context: flowsint-web
dockerfile: Dockerfile
container_name: flowsint-web
ports:
- "3000:3000"
env_file:
- .env
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextjs.rule=Host(`app.flowsint.localhost`)"
- "traefik.http.services.nextjs.loadbalancer.server.port=3000"
- "traefik.http.routers.nextjs.entrypoints=websecure"
# Flask-like application with Celery
api:
build:
context: flowsint-api
dockerfile: Dockerfile
container_name: flowsint-api
ports:
- "5000:5000"
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379/0
- ENV=prod
command: ["/app/entrypoint.sh", "app"]
restart: always
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`api.flowsint.localhost`)"
- "traefik.http.services.app.loadbalancer.server.port=5000"
- "traefik.http.routers.app.entrypoints=websecure"
celery:
build:
context: flowsint-api
dockerfile: Dockerfile
container_name: celery-worker
depends_on:
- redis
- api
environment:
- REDIS_URL=redis://redis:6379/0
- ENV=prod
command: ["/app/entrypoint.sh", "celery"]
restart: always
networks:
- traefik
redis:
image: "redis:alpine"
container_name: redis-cache
ports:
- "6379:6379"
networks:
- traefik
networks:
traefik:
name: traefik
driver: bridge
volumes:
db-config: