From 6064aa1a5a0d1b6ec84113ccc9c0d1290413bc5b Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Sun, 20 Sep 2020 13:22:17 +0200 Subject: [PATCH] :zap: Remove docker-compose exmple as support will be removed #962 --- docker/compose/withMongo/.env | 9 ------ docker/compose/withMongo/README.md | 26 ---------------- docker/compose/withMongo/docker-compose.yml | 34 --------------------- docker/compose/withMongo/init-data.sh | 17 ----------- 4 files changed, 86 deletions(-) delete mode 100644 docker/compose/withMongo/.env delete mode 100644 docker/compose/withMongo/README.md delete mode 100644 docker/compose/withMongo/docker-compose.yml delete mode 100755 docker/compose/withMongo/init-data.sh diff --git a/docker/compose/withMongo/.env b/docker/compose/withMongo/.env deleted file mode 100644 index a1141f23f6..0000000000 --- a/docker/compose/withMongo/.env +++ /dev/null @@ -1,9 +0,0 @@ -MONGO_INITDB_ROOT_USERNAME=changeUser -MONGO_INITDB_ROOT_PASSWORD=changePassword -MONGO_INITDB_DATABASE=n8n - -MONGO_NON_ROOT_USERNAME=changeUser -MONGO_NON_ROOT_PASSWORD=changePassword - -N8N_BASIC_AUTH_USER=changeUser -N8N_BASIC_AUTH_PASSWORD=changePassword diff --git a/docker/compose/withMongo/README.md b/docker/compose/withMongo/README.md deleted file mode 100644 index bfb4b0f647..0000000000 --- a/docker/compose/withMongo/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# n8n with MongoDB - -Starts n8n with MongoDB as database. - - -## Start - -To start n8n with MongoDB simply start docker-compose by executing the following -command in the current folder. - - -**IMPORTANT:** But before you do that change the default users and passwords in the `.env` file! - -``` -docker-compose up -d -``` - -To stop it execute: - -``` -docker-compose stop -``` - -## Configuration - -The default name of the database, user and password for MongoDB can be changed in the `.env` file in the current directory. diff --git a/docker/compose/withMongo/docker-compose.yml b/docker/compose/withMongo/docker-compose.yml deleted file mode 100644 index 67cfcf001b..0000000000 --- a/docker/compose/withMongo/docker-compose.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: '3.1' - -services: - - mongo: - image: mongo:4.0 - restart: always - 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 - - 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 - links: - - mongo - volumes: - - ~/.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" diff --git a/docker/compose/withMongo/init-data.sh b/docker/compose/withMongo/init-data.sh deleted file mode 100755 index bf5c10c84e..0000000000 --- a/docker/compose/withMongo/init-data.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e; - -# Create a default non-root role -MONGO_NON_ROOT_ROLE="${MONGO_NON_ROOT_ROLE:-readWrite}" - -if [ -n "${MONGO_NON_ROOT_USERNAME:-}" ] && [ -n "${MONGO_NON_ROOT_PASSWORD:-}" ]; then - "${mongo[@]}" "$MONGO_INITDB_DATABASE" <<-EOJS - db.createUser({ - user: $(_js_escape "$MONGO_NON_ROOT_USERNAME"), - pwd: $(_js_escape "$MONGO_NON_ROOT_PASSWORD"), - roles: [ { role: $(_js_escape "$MONGO_NON_ROOT_ROLE"), db: $(_js_escape "$MONGO_INITDB_DATABASE") } ] - }) - EOJS -else - echo "SETUP INFO: No Environment variables given!" -fi