From 5c3e1d769fcb49f5f1dff416df294275bf10958f Mon Sep 17 00:00:00 2001 From: LRVT <21357789+l4rm4nd@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:29:00 +0100 Subject: [PATCH] Update README.md --- examples/n8n/README.md | 43 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/examples/n8n/README.md b/examples/n8n/README.md index 50ad7a9..4078d66 100644 --- a/examples/n8n/README.md +++ b/examples/n8n/README.md @@ -1,4 +1,45 @@ # References - https://github.com/n8n-io/n8n -- https://github.com/n8n-io/n8n/tree/master/docker/compose/withMariaDB +- https://github.com/n8n-io/n8n/tree/master/docker/compose/withPostgres + +# Notes + +You have to pre-supply a database init script to properly setup the postgresql database beforehand. + +Please follow these steps to do so: + +```` +# create new directory for database +mkdir -p /mnt/docker-volumes/n8n + +# move the init file from this repo to the new location +mv init-database.sh /mnt/docker-volumes/n8n/. + +# optional; adjust permissions +sudo chmod -R 777 /mnt/docker-volumes/n8n/ +```` + +Afterwards, you can proceed spawning up the docker compose stack with: + +```` +docker compose up +```` + +> [!WARNING] +> Upon starting the stack you may see n8n errors regarding permissions: +> +> ```` +> [EACCES] Error Plugin: n8n: EACCES: permission denied, open '/home/node/.n8n/config' +> ```` +> +> You can fix those my running: +> ```` +> sudo chmod -R 777 /mnt/docker-volumes/n8n/database +> ```` +> +> and restarting the stack: +> +> ```` +> docker compose up --force-recreate +> ````