Files
docker-compose/__swarm/n8n/n8n-swarm.yml
T
2026-03-19 21:41:03 +01:00

58 lines
1.5 KiB
YAML

version: '3'
services:
app:
image: ${DOCKER_REGISTRY:-}n8nio/n8n:latest
ports:
- target: 5678
published: 5679
protocol: tcp
mode: ingress
environment:
N8N_HOST: n8n.sectorq.eu
N8N_PORT: '5678'
N8N_PROTOCOL: https
N8N_BASIC_AUTH_ACTIVE: 'true'
N8N_BASIC_AUTH_USER: sth
N8N_BASIC_AUTH_PASSWORD: pwd
N8N_RUNNERS_ENABLED: 'true'
N8N_RUNNERS_MODE: external
N8N_RUNNERS_BROKER_LISTEN_ADDRESS: 0.0.0.0
N8N_RUNNERS_AUTH_TOKEN: l4c1j4yd33Du5lo
N8N_NATIVE_PYTHON_RUNNER: 'true'
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: 'true'
N8N_SECURE_COOKIE: 'false'
N8N_GIT_NODE_ALLOW_LOCAL: 'true'
WEBHOOK_URL: https://n8n.sectorq.eu
NODES_EXCLUDE: "[]"
volumes:
- data:/home/node/.n8n
- files:/home/node/.n8n-files/
stop_grace_period: 60s
deploy:
labels:
homepage.container: n8n_app
homepage.description: Workflow management
homepage.group: Utils
homepage.href: https://${APPNAME}.sectorq.eu
homepage.icon: /icons/n8n.svg
homepage.name: n8n
homepage.server: my-docker-swarm
wud.watch: 'true'
wud.watch.digest: 'true'
replicas: 1
placement:
constraints:
- node.role == manager
task-runners:
image: n8nio/runners:latest
environment:
N8N_RUNNERS_TASK_BROKER_URI: http://n8n-main:5679
N8N_RUNNERS_AUTH_TOKEN: l4c1j4yd33Du5lo
# etc.
depends_on:
- n8n
volumes:
data:
driver: local
files:
driver: local