From 573bc8bceac5ee3ac923780cd29c51c7e5fd9187 Mon Sep 17 00:00:00 2001 From: Cornelius Suermann Date: Thu, 23 Mar 2023 15:38:01 +0100 Subject: [PATCH] docs: Refer to docker.n8n.io/n8nio/n8n for pulling n8n docker images (no-changelog) (#5763) --- .../subfolderWithSSL/docker-compose.yml | 2 +- docker/compose/withMariaDB/docker-compose.yml | 2 +- .../compose/withPostgres/docker-compose.yml | 2 +- .../withPostgresAndWorker/docker-compose.yml | 4 +- docker/images/n8n/README.md | 127 +++++++++--------- packages/cli/README.md | 6 +- 6 files changed, 73 insertions(+), 70 deletions(-) diff --git a/docker/compose/subfolderWithSSL/docker-compose.yml b/docker/compose/subfolderWithSSL/docker-compose.yml index f6ce218bff..37a4b25f18 100644 --- a/docker/compose/subfolderWithSSL/docker-compose.yml +++ b/docker/compose/subfolderWithSSL/docker-compose.yml @@ -20,7 +20,7 @@ services: - ${DATA_FOLDER}/letsencrypt:/letsencrypt - /var/run/docker.sock:/var/run/docker.sock:ro n8n: - image: n8nio/n8n + image: docker.n8n.io/n8nio/n8n ports: - '127.0.0.1:5678:5678' labels: diff --git a/docker/compose/withMariaDB/docker-compose.yml b/docker/compose/withMariaDB/docker-compose.yml index 14e478683e..e7a1db74e0 100644 --- a/docker/compose/withMariaDB/docker-compose.yml +++ b/docker/compose/withMariaDB/docker-compose.yml @@ -23,7 +23,7 @@ services: retries: 10 n8n: - image: n8nio/n8n + image: docker.n8n.io/n8nio/n8n restart: always environment: - DB_TYPE=mariadb diff --git a/docker/compose/withPostgres/docker-compose.yml b/docker/compose/withPostgres/docker-compose.yml index c102d81837..9b3ab5b83e 100644 --- a/docker/compose/withPostgres/docker-compose.yml +++ b/docker/compose/withPostgres/docker-compose.yml @@ -24,7 +24,7 @@ services: retries: 10 n8n: - image: n8nio/n8n + image: docker.n8n.io/n8nio/n8n restart: always environment: - DB_TYPE=postgresdb diff --git a/docker/compose/withPostgresAndWorker/docker-compose.yml b/docker/compose/withPostgresAndWorker/docker-compose.yml index 308e5abc47..9f947d735d 100644 --- a/docker/compose/withPostgresAndWorker/docker-compose.yml +++ b/docker/compose/withPostgresAndWorker/docker-compose.yml @@ -63,14 +63,14 @@ services: n8n: <<: *shared - image: n8nio/n8n + image: docker.n8n.io/n8nio/n8n command: /bin/sh -c "n8n start --tunnel" ports: - 5678:5678 n8n-worker: <<: *shared - image: n8nio/n8n + image: docker.n8n.io/n8nio/n8n command: /bin/sh -c "sleep 5; n8n worker" depends_on: - n8n diff --git a/docker/images/n8n/README.md b/docker/images/n8n/README.md index 4cec9c4cc2..376c4494ab 100644 --- a/docker/images/n8n/README.md +++ b/docker/images/n8n/README.md @@ -40,12 +40,12 @@ Additional information and example workflows on the n8n.io website: [https://n8n ## Start n8n in Docker -``` +```bash docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n + --name n8n \ + -p 5678:5678 \ + -v ~/.n8n:/home/node/.n8n \ + docker.n8n.io/n8nio/n8n ``` You can then access n8n by opening: @@ -62,13 +62,13 @@ n8n instance. To use it simply start n8n with `--tunnel` -``` +```bash docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n \ - n8n start --tunnel + --name n8n \ + -p 5678:5678 \ + -v ~/.n8n:/home/node/.n8n \ + docker.n8n.io/n8nio/n8n \ + n8n start --tunnel ``` ## Securing n8n @@ -79,7 +79,7 @@ to make sure that n8n is protected! Right now we have very basic protection via basic-auth in place. It can be activated by setting the following environment variables: -``` +```text N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER= N8N_BASIC_AUTH_PASSWORD= @@ -91,12 +91,12 @@ The workflow data gets by default saved in an SQLite database in the user folder (`/home/node/.n8n`). That folder also additionally contains the settings like webhook URL and encryption key. -``` +```bash docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n + --name n8n \ + -p 5678:5678 \ + -v ~/.n8n:/home/node/.n8n \ + docker.n8n.io/n8nio/n8n ``` ### Start with other Database @@ -123,20 +123,20 @@ Replace the following placeholders with the actual data: - POSTGRES_USER - POSTGRES_SCHEMA -``` +```bash docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -e DB_TYPE=postgresdb \ - -e DB_POSTGRESDB_DATABASE= \ - -e DB_POSTGRESDB_HOST= \ - -e DB_POSTGRESDB_PORT= \ - -e DB_POSTGRESDB_USER= \ - -e DB_POSTGRESDB_SCHEMA= \ - -e DB_POSTGRESDB_PASSWORD= \ - -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n \ - n8n start + --name n8n \ + -p 5678:5678 \ + -e DB_TYPE=postgresdb \ + -e DB_POSTGRESDB_DATABASE= \ + -e DB_POSTGRESDB_HOST= \ + -e DB_POSTGRESDB_PORT= \ + -e DB_POSTGRESDB_USER= \ + -e DB_POSTGRESDB_SCHEMA= \ + -e DB_POSTGRESDB_PASSWORD= \ + -v ~/.n8n:/home/node/.n8n \ + docker.n8n.io/n8nio/n8n \ + n8n start ``` A full working setup with docker-compose can be found [here](https://github.com/n8n-io/n8n/blob/master/docker/compose/withPostgres/README.md) @@ -151,19 +151,19 @@ Replace the following placeholders with the actual data: - MYSQLDB_PORT - MYSQLDB_USER -``` +```bash docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -e DB_TYPE=mysqldb \ - -e DB_MYSQLDB_DATABASE= \ - -e DB_MYSQLDB_HOST= \ - -e DB_MYSQLDB_PORT= \ - -e DB_MYSQLDB_USER= \ - -e DB_MYSQLDB_PASSWORD= \ - -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n \ - n8n start + --name n8n \ + -p 5678:5678 \ + -e DB_TYPE=mysqldb \ + -e DB_MYSQLDB_DATABASE= \ + -e DB_MYSQLDB_HOST= \ + -e DB_MYSQLDB_PORT= \ + -e DB_MYSQLDB_USER= \ + -e DB_MYSQLDB_PASSWORD= \ + -v ~/.n8n:/home/node/.n8n \ + docker.n8n.io/n8nio/n8n \ + n8n start ``` ## Passing Sensitive Data via File @@ -191,16 +191,21 @@ A basic step by step example setup of n8n with docker-compose and Lets Encrypt i ## Updating a running docker-compose instance -``` -# Pull down the latest version from dockerhub -docker pull n8nio/n8n -# Stop current setup -sudo docker-compose stop -# Delete it (will only delete the docker-containers, data is stored separately) -sudo docker-compose rm -# Then start it again -sudo docker-compose up -d -``` +1. Pull the latest version from the registry + + `docker pull docker.n8n.io/n8nio/n8n` + +2. Stop the current setup + + `sudo docker-compose stop` + +3. Delete it (will only delete the docker-containers, data is stored separately) + + `sudo docker-compose rm` + +4. Then start it again + + `sudo docker-compose up -d` ## Setting Timezone @@ -212,22 +217,22 @@ the environment variable `TZ`. Example to use the same timezone for both: -``` +```bash docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -e GENERIC_TIMEZONE="Europe/Berlin" \ - -e TZ="Europe/Berlin" \ - n8nio/n8n + --name n8n \ + -p 5678:5678 \ + -e GENERIC_TIMEZONE="Europe/Berlin" \ + -e TZ="Europe/Berlin" \ + docker.n8n.io/n8nio/n8n ``` ## Build Docker-Image -``` -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg N8N_VERSION= -t n8nio/n8n: . +```bash +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg N8N_VERSION= -t n8n: . # For example: -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg N8N_VERSION=0.114.0 -t n8nio/n8n:0.114.0 . +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg N8N_VERSION=0.114.0 -t n8n:0.114.0 . ``` ## What does n8n mean and how do you pronounce it? diff --git a/packages/cli/README.md b/packages/cli/README.md index b7043db915..6641c7d12a 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -58,7 +58,7 @@ To play around with n8n, you can also start it using Docker: docker run -it --rm \ --name n8n \ -p 5678:5678 \ - n8nio/n8n + docker.n8n.io/n8nio/n8n ``` Be aware that all the data will be lost once the Docker container gets removed. To persist the data mount the `~/.n8n` folder: @@ -68,11 +68,9 @@ docker run -it --rm \ --name n8n \ -p 5678:5678 \ -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n + docker.n8n.io/n8nio/n8n ``` -n8n also offers a Docker image for Raspberry Pi: `n8nio/n8n:latest-rpi`. - Refer to the [documentation](https://github.com/n8n-io/n8n/blob/master/docker/images/n8n/README.md) for more information on the Docker setup. ### Install with npm