Refactor Docker Compose files for n8n and Portainer: update volume paths and network configurations; remove deprecated n8n configuration file.

This commit is contained in:
2025-11-13 03:38:48 +01:00
parent 2423223b39
commit 75874a2ff3
4 changed files with 42 additions and 64 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ services:
environment: environment:
- TZ=Europe/Bratislava - TZ=Europe/Bratislava
volumes: volumes:
- ./dockmon:/app/data - ./volumes/dockmon:/app/data
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
healthcheck: healthcheck:
test: ["CMD", "curl", "-k", "-f", "https://localhost:443/health"] test: ["CMD", "curl", "-k", "-f", "https://localhost:443/health"]
+32 -54
View File
@@ -87,6 +87,7 @@ x-app: &app
networks: networks:
- traefik-proxy - traefik-proxy
- default - default
- n8n
x-frontend: &frontend x-frontend: &frontend
image: watercrawl/frontend:${VERSION:-v0.10.2} image: watercrawl/frontend:${VERSION:-v0.10.2}
@@ -112,7 +113,8 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
- traefik-proxy - traefik-proxy
- default - n8n
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.docker.network=traefik-proxy" - "traefik.docker.network=traefik-proxy"
@@ -140,7 +142,7 @@ services:
image: minio/minio:RELEASE.2024-11-07T00-52-20Z image: minio/minio:RELEASE.2024-11-07T00-52-20Z
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./edu_master/volumes/minio-data:/data - ./volumes/edu_master/volumes/minio-data:/data
command: server /data --console-address ":9001" command: server /data --console-address ":9001"
environment: environment:
- MINIO_BROWSER_REDIRECT_URL=${MINIO_BROWSER_REDIRECT_URL:-http://localhost/minio-console/} - MINIO_BROWSER_REDIRECT_URL=${MINIO_BROWSER_REDIRECT_URL:-http://localhost/minio-console/}
@@ -161,7 +163,7 @@ services:
- 1.1.1.1 - 1.1.1.1
networks: networks:
- traefik-proxy - traefik-proxy
- default - n8n
db: db:
image: postgres:17.2-alpine3.21 image: postgres:17.2-alpine3.21
@@ -171,7 +173,7 @@ services:
- POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-postgres} - POSTGRES_DB=${POSTGRES_DB:-postgres}
volumes: volumes:
- ./edu_master/volumes/postgres-db:/var/lib/postgresql/data - ./volumes/edu_master/volumes/postgres-db:/var/lib/postgresql/data
healthcheck: healthcheck:
test: [ "CMD-SHELL", "pg_isready" ] test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s interval: 10s
@@ -182,6 +184,8 @@ services:
image: watercrawl/mcp:v1.2.0 image: watercrawl/mcp:v1.2.0
restart: unless-stopped restart: unless-stopped
command: [ "sse", "--base-url", "http://app:9000", '--port', '3000', '--endpoint', '/sse' ] command: [ "sse", "--base-url", "http://app:9000", '--port', '3000', '--endpoint', '/sse' ]
networks:
- n8n
redis: redis:
image: redis:latest image: redis:latest
@@ -191,7 +195,7 @@ services:
image: ollama/ollama:latest image: ollama/ollama:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./edu_master/volumes/ollama-models:/root/.ollama - ./volumes/edu_master/volumes/ollama-models:/root/.ollama
environment: environment:
- OLLAMA_DISABLE_TELEMETRY=true - OLLAMA_DISABLE_TELEMETRY=true
- OLLAMA_KEEP_ALIVE=5m - OLLAMA_KEEP_ALIVE=5m
@@ -201,59 +205,33 @@ services:
dns: dns:
- 1.1.1.1 - 1.1.1.1
- 8.8.8.8 - 8.8.8.8
n8n:
image: docker.n8n.io/n8nio/n8n
restart: unless-stopped
environment:
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
- N8N_PORT=5678
- N8N_RUNNERS_ENABLED=true
- NODE_ENV=production
- GENERIC_TIMEZONE=Europe/Bratislava
- TZ=Europe/Bratislava
- N8N_SECURE_COOKIE=false
- N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
volumes:
- n8n_data:/home/node/.n8n
- ./edu_master/n8n/local-files:/files
extra_hosts:
- "enterprise.n8n.io:104.26.13.187"
- "enterprise.n8n.io:104.26.12.187"
- "enterprise.n8n.io:172.67.68.102"
dns:
- 1.1.1.1
- 8.8.8.8
networks: networks:
- traefik-proxy - n8n
- default
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-proxy"
# docker exec -it edu_master-llm-1 ollama pull neural-chat:7b-q4 # docker exec -it edu_master-llm-1 ollama pull neural-chat:7b-q4
# docker exec -it edu_master-llm-1 ollama pull mistral:7b-q4 # docker exec -it edu_master-llm-1 ollama pull mistral:7b-q4
lessons-bot: # lessons-bot:
build: # build:
context: edu_master/lessons_bot/ # context: edu_master/lessons_bot/
dockerfile: Dockerfile # dockerfile: Dockerfile
restart: unless-stopped # restart: unless-stopped
environment: # environment:
- LESSONS_BOT_TOKEN=${LESSONS_BOT_TOKEN} # - LESSONS_BOT_TOKEN=${LESSONS_BOT_TOKEN}
- N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL:-http://n8n:5678/webhook-test/get-lessons} # - N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL:-http://n8n:5678/webhook-test/get-lessons}
- N8N_SECRET=${N8N_SECRET:-your-secret-token-here} # - N8N_SECRET=${N8N_SECRET:-your-secret-token-here}
- WATERCRAWL_API_URL=${WATERCRAWL_API_URL:-http://app:9000/api} # - WATERCRAWL_API_URL=${WATERCRAWL_API_URL:-http://app:9000/api}
- PHPSESSID_BOT_URL=${PHPSESSID_BOT_URL:-http://phpsessid-bot:5000} # - PHPSESSID_BOT_URL=${PHPSESSID_BOT_URL:-http://phpsessid-bot:5000}
- EDU_HOST=${EDU_HOST:-edu.edu.vn.ua} # - EDU_HOST=${EDU_HOST:-edu.edu.vn.ua}
depends_on: # depends_on:
- n8n # - n8n
- app # - app
- phpsessid-bot # - phpsessid-bot
dns: # dns:
- 1.1.1.1 # - 1.1.1.1
- 8.8.8.8 # - 8.8.8.8
networks: # networks:
- default # - default
phpsessid-bot: phpsessid-bot:
build: build:
@@ -11,7 +11,7 @@
- N8N_SECURE_COOKIE=false - N8N_SECURE_COOKIE=false
- N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true - N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
volumes: volumes:
- n8n_data:/home/node/.n8n - ./volumes/n8n_data:/home/node/.n8n
- ./n8n/local-files:/files - ./n8n/local-files:/files
extra_hosts: extra_hosts:
- "enterprise.n8n.io:104.26.13.187" - "enterprise.n8n.io:104.26.13.187"
@@ -23,10 +23,10 @@
networks: networks:
- traefik-proxy - traefik-proxy
- default - default
- n8n
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.n8n.rule=Host(`n8n.workstation`)"
- "traefik.http.routers.n8n.entrypoints=websecure"
- "traefik.http.services.n8n.loadbalancer.server.port=5678"
- "traefik.docker.network=traefik-proxy" - "traefik.docker.network=traefik-proxy"
- "traefik.http.routers.n8n.tls.certresolver=le" networks:
n8n:
driver: bridge
+1 -1
View File
@@ -5,7 +5,7 @@ services:
restart: always restart: always
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ./portainer_data:/data - ./volumes/portainer_data:/data
ports: ports:
- 9443:9443 - 9443:9443
# - 8000:8000 # Remove if you do not intend to use Edge Agents # - 8000:8000 # Remove if you do not intend to use Edge Agents