Add docker-compose configuration for n8n service

This commit is contained in:
2025-11-21 19:15:21 -05:00
parent b4430bd468
commit 4dfc7ceb68

26
n8n/docker-compose.yml Normal file
View File

@@ -0,0 +1,26 @@
version: '2'
services:
n8n:
container_name: n8n
image: docker.n8n.io/n8nio/n8n
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
volumes:
- /docker-containers/n8n/data:/home/node/.n8n
- /docker-containers/n8n/local-files:/files
stdin_open: true # to attach to containers
tty: true # also used to attach to containers
# network_mode: service:wireguard # To run through vpn service container, in turn UI port must be forwarded inside vpn. No local access unless otherwise defined
networks: # Specify network for container
- homelab
networks: # I don't know why but you have to specify the network 2x. In service, and in this tag area..
homelab:
external: true # This option causes compose to join the above network instead of making a _default one (supposedly)