2022-08-19 06:34:02 -07:00
|
|
|
version: '3'
|
2020-07-12 00:28:08 -07:00
|
|
|
|
|
|
|
services:
|
|
|
|
traefik:
|
2022-08-19 06:34:02 -07:00
|
|
|
image: 'traefik'
|
2020-07-12 00:28:08 -07:00
|
|
|
command:
|
2022-08-19 06:34:02 -07:00
|
|
|
- '--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'
|
2020-07-12 00:28:08 -07:00
|
|
|
ports:
|
2022-08-19 06:34:02 -07:00
|
|
|
- '443:443'
|
|
|
|
- '80:80'
|
2020-07-12 00:28:08 -07:00
|
|
|
volumes:
|
|
|
|
- ${DATA_FOLDER}/letsencrypt:/letsencrypt
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
n8n:
|
2023-03-23 07:38:01 -07:00
|
|
|
image: docker.n8n.io/n8nio/n8n
|
2020-07-12 00:28:08 -07:00
|
|
|
ports:
|
2022-08-19 06:34:02 -07:00
|
|
|
- '127.0.0.1:5678:5678'
|
2020-07-12 00:28:08 -07:00
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.http.routers.n8n.rule=Host(`${DOMAIN_NAME}`)
|
|
|
|
- traefik.http.routers.n8n.tls=true
|
|
|
|
- traefik.http.routers.n8n.entrypoints=websecure
|
2022-08-19 06:34:02 -07:00
|
|
|
- 'traefik.http.routers.n8n.rule=PathPrefix(`/${SUBFOLDER}{regex:$$|/.*}`)'
|
|
|
|
- 'traefik.http.middlewares.n8n-stripprefix.stripprefix.prefixes=/${SUBFOLDER}'
|
|
|
|
- 'traefik.http.routers.n8n.middlewares=n8n-stripprefix'
|
2020-07-12 00:28:08 -07:00
|
|
|
- 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_BASIC_AUTH_ACTIVE=true
|
|
|
|
- N8N_BASIC_AUTH_USER
|
|
|
|
- N8N_BASIC_AUTH_PASSWORD
|
|
|
|
- N8N_HOST=${DOMAIN_NAME}
|
|
|
|
- N8N_PORT=5678
|
|
|
|
- N8N_PROTOCOL=https
|
|
|
|
- NODE_ENV=production
|
|
|
|
- N8N_PATH
|
2021-02-09 14:32:40 -08:00
|
|
|
- WEBHOOK_URL=https://${DOMAIN_NAME}${N8N_PATH}
|
2020-07-12 00:28:08 -07:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2020-12-06 10:45:58 -08:00
|
|
|
- ${DATA_FOLDER}/.n8n:/home/node/.n8n
|