mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
✨ Use convict for configuration to make n8n easier to configure
This commit is contained in:
@@ -17,6 +17,9 @@ services:
|
||||
n8n:
|
||||
image: n8n
|
||||
restart: always
|
||||
environment:
|
||||
- DB_TYPE=mongodb
|
||||
- DB_MONGODB_CONNECTION_URL=mongodb://n8nuser:${MONGO_NON_ROOT_PASSWORD}@mongo:27017/${MONGO_INITDB_DATABASE}
|
||||
ports:
|
||||
- 5678:5678
|
||||
links:
|
||||
@@ -25,4 +28,4 @@ services:
|
||||
- ~/.n8n:/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 --NODE_CONFIG='{\"database\":{\"type\":\"mongodb\", \"mongodbConfig\":{\"url\":\"mongodb://n8nuser:${MONGO_NON_ROOT_PASSWORD}@mongo:27017/${MONGO_INITDB_DATABASE}\"}}}'"
|
||||
command: /bin/sh -c "sleep 5; n8n start"
|
||||
|
||||
@@ -89,10 +89,11 @@ Replace the following placeholders with the actual data:
|
||||
docker run -it --rm \
|
||||
--name n8n \
|
||||
-p 5678:5678 \
|
||||
-e DB_TYPE=mongodb \
|
||||
-e DB_MONGODB_CONNECTION_URL="mongodb://MONGO_USER:MONGO_PASSWORD@MONGO_SERVER:MONGO_PORT/MONGO_DATABASE" \
|
||||
-v ~/.n8n:/root/.n8n \
|
||||
n8nio/n8n \
|
||||
n8n start \
|
||||
--NODE_CONFIG='{\"database\":{\"type\":\"mongodb\", \"mongodbConfig\":{\"url\":\"mongodb://MONGO_USER:MONGO_PASSWORD@MONGO_SERVER:MONGO_PORT/MONGO_DATABASE\"}}}'"
|
||||
n8n start
|
||||
```
|
||||
|
||||
A full working setup with docker-compose can be found [here](../../compose/withMongo/README.md)
|
||||
|
||||
Reference in New Issue
Block a user