Created
December 6, 2019 01:52
-
-
Save mjhuber/380666b29a92311752a95b645e52ace4 to your computer and use it in GitHub Desktop.
n8n
This file contains 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
version: '3.1' | |
services: | |
mongo: | |
image: mongo:4.0 | |
restart: always | |
networks: | |
- n8n | |
environment: | |
- MONGO_INITDB_ROOT_USERNAME | |
- MONGO_INITDB_ROOT_PASSWORD | |
- MONGO_INITDB_DATABASE | |
- MONGO_NON_ROOT_USERNAME | |
- MONGO_NON_ROOT_PASSWORD | |
volumes: | |
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh | |
- /usr/local/docker/n8n/db:/data/db | |
n8n: | |
image: n8nio/n8n | |
restart: always | |
environment: | |
- DB_TYPE=mongodb | |
- DB_MONGODB_CONNECTION_URL=mongodb://${MONGO_NON_ROOT_USERNAME}:${MONGO_NON_ROOT_PASSWORD}@mongo:27017/${MONGO_INITDB_DATABASE} | |
- N8N_BASIC_AUTH_ACTIVE=true | |
- N8N_BASIC_AUTH_USER | |
- N8N_BASIC_AUTH_PASSWORD | |
ports: | |
- 5678:5678 | |
depends_on: | |
- mongo | |
expose: | |
- 5678 | |
networks: | |
- frontend | |
- n8n | |
links: | |
- mongo | |
volumes: | |
- /usr/local/docker/n8n/data:/root/.n8n | |
# Wait 5 seconds to start n8n to make sure that MongoDB is ready | |
# when n8n tries to connect to it | |
command: /bin/sh -c "sleep 5; n8n start" | |
labels: | |
- "traefik.frontend.rule=Host:n8n.jarvis" | |
- "traefik.backend=n8n" | |
- "traefik.docker.network=frontend" | |
- "traefik.enable=true" | |
- "traefik.port=5678" | |
- "traefik.default.protocol=http" | |
networks: | |
n8n: | |
frontend: | |
external: | |
name: frontend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment