-
-
Save markizano/53c6430915957ae788e358f63a7b32bc to your computer and use it in GitHub Desktop.
n8n docker compose configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### N8N Configuration ### | |
| # This is just a sample. Populate this with the actual fields you will use. | |
| # DOMAIN_NAME and SUBDOMAIN together determine where n8n will be reachable from | |
| # The top level domain to serve from | |
| DOMAIN_NAME=example.com | |
| # The subdomain to serve from | |
| SUBDOMAIN=n8n | |
| # The above example serve n8n at: https://n8n.example.com | |
| # Optional timezone to set which gets used by Cron and other scheduling nodes | |
| # New York is the default value if not set | |
| GENERIC_TIMEZONE=UTC | |
| # The email address to use for the TLS/SSL certificate creation | |
| SSL_EMAIL=admin@example.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| n8n: | |
| # This is optional. Disable <image> if you enable this. | |
| # Personally, I needed a different UID mapping in my system. | |
| # build: | |
| # pull: true | |
| # dockerfile_inline: |- | |
| # FROM docker.n8n.io/n8nio/n8n | |
| # USER root | |
| # RUN apk add shadow | |
| # RUN groupadd --gid=200 apps | |
| # RUN usermod --gid=200 --uid=201 node | |
| # USER node | |
| image: docker.n8n.io/n8nio/n8n | |
| pull_policy: daily | |
| hostname: n8n.docker | |
| restart: always | |
| network_mode: bridge | |
| ports: | |
| - "127.0.0.1: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} | |
| - SSL_OP_LEGACY_SERVER_CONNECT=1 | |
| - N8N_DEFAULT_BINARY_DATA_MODE=filesystem | |
| volumes: | |
| - ./n8n_data:/home/node/.n8n | |
| - ./n8n_local-files:/files | |
| # This is optional as well. I have a lot of memory on the system it's running. | |
| # So I reduced what n8n can see since the app itself doesn't need that much. | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 4G |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment