mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
8c008f5d22
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
53 lines
2 KiB
YAML
53 lines
2 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
traefik:
|
|
image: 'traefik'
|
|
command:
|
|
- '--api=true'
|
|
- '--api.insecure=true'
|
|
- '--api.dashboard=true'
|
|
- '--providers.docker=true'
|
|
- '--providers.docker.exposedbydefault=false'
|
|
- '--entrypoints.websecure.address=:443'
|
|
- '--certificatesresolvers.mytlschallenge.acme.tlschallenge=true'
|
|
- '--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}'
|
|
- '--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json'
|
|
ports:
|
|
- '443:443'
|
|
- '80:80'
|
|
volumes:
|
|
- ${DATA_FOLDER}/letsencrypt:/letsencrypt
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
n8n:
|
|
image: docker.n8n.io/n8nio/n8n
|
|
ports:
|
|
- '127.0.0.1:5678:5678'
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.n8n.rule=Host(`${DOMAIN_NAME}`)
|
|
- traefik.http.routers.n8n.tls=true
|
|
- traefik.http.routers.n8n.entrypoints=websecure
|
|
- 'traefik.http.routers.n8n.rule=PathPrefix(`/${SUBFOLDER}{regex:$$|/.*}`)'
|
|
- 'traefik.http.middlewares.n8n-stripprefix.stripprefix.prefixes=/${SUBFOLDER}'
|
|
- 'traefik.http.routers.n8n.middlewares=n8n-stripprefix'
|
|
- traefik.http.routers.n8n.tls.certresolver=mytlschallenge
|
|
- traefik.http.middlewares.n8n.headers.SSLRedirect=true
|
|
- traefik.http.middlewares.n8n.headers.STSSeconds=315360000
|
|
- traefik.http.middlewares.n8n.headers.browserXSSFilter=true
|
|
- traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
|
|
- traefik.http.middlewares.n8n.headers.forceSTSHeader=true
|
|
- traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
|
|
- traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
|
|
- traefik.http.middlewares.n8n.headers.STSPreload=true
|
|
environment:
|
|
- N8N_HOST=${DOMAIN_NAME}
|
|
- N8N_PORT=5678
|
|
- N8N_PROTOCOL=https
|
|
- NODE_ENV=production
|
|
- N8N_PATH
|
|
- WEBHOOK_URL=https://${DOMAIN_NAME}${N8N_PATH}
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${DATA_FOLDER}/.n8n:/home/node/.n8n
|