mirror of
https://github.com/reconurge/flowsint.git
synced 2026-03-12 01:44:42 -05:00
150 lines
3.5 KiB
YAML
150 lines
3.5 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
|
|
# PostgreSQL database
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: flowsint-postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: flowsint
|
|
POSTGRES_PASSWORD: flowsint
|
|
POSTGRES_DB: flowsint
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- pg_data:/var/lib/postgresql/data
|
|
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"
|
|
|
|
# FastAPI application with Celery
|
|
api:
|
|
build:
|
|
context: flowsint-api
|
|
dockerfile: Dockerfile
|
|
container_name: flowsint-api
|
|
ports:
|
|
- "5000:5000"
|
|
depends_on:
|
|
- redis
|
|
- neo4j
|
|
- postgres
|
|
env_file:
|
|
- .env
|
|
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
|
|
- neo4j
|
|
- postgres
|
|
env_file:
|
|
- .env
|
|
command: ["/app/entrypoint.sh", "celery"]
|
|
restart: always
|
|
networks:
|
|
- traefik
|
|
|
|
redis:
|
|
image: "redis:alpine"
|
|
container_name: redis-cache
|
|
ports:
|
|
- "6379:6379"
|
|
networks:
|
|
- traefik
|
|
|
|
neo4j:
|
|
image: neo4j:5
|
|
container_name: flowsint-neo4j
|
|
ports:
|
|
- "7474:7474" # Web UI
|
|
- "7687:7687" # Bolt
|
|
environment:
|
|
- NEO4J_AUTH=${NEO4J_USER}/${NEO4J_PASSWORD}
|
|
- NEO4J_PLUGINS=["apoc"]
|
|
- NEO4J_apoc_export_file_enabled=true
|
|
- NEO4J_apoc_import_file_enabled=true
|
|
- NEO4J_apoc_import_file_use__neo4j__config=true
|
|
volumes:
|
|
- neo4j_data:/data
|
|
- neo4j_logs:/logs
|
|
- neo4j_import:/var/lib/neo4j/import
|
|
- neo4j_plugins:/plugins
|
|
restart: unless-stopped
|
|
networks:
|
|
- traefik
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.neo4j.rule=Host(`neo4j.flowsint.localhost`)"
|
|
- "traefik.http.services.neo4j.loadbalancer.server.port=7474"
|
|
- "traefik.http.routers.neo4j.entrypoints=websecure"
|
|
|
|
|
|
networks:
|
|
traefik:
|
|
name: traefik
|
|
driver: bridge
|
|
|
|
volumes:
|
|
db-config:
|
|
neo4j_data:
|
|
neo4j_logs:
|
|
neo4j_import:
|
|
neo4j_plugins:
|
|
pg_data:
|