diff --git a/.templates/n8n/build.py b/.templates/n8n/build.py index d717b000..da138768 100755 --- a/.templates/n8n/build.py +++ b/.templates/n8n/build.py @@ -14,7 +14,7 @@ def main(): from blessed import Terminal from deps.chars import specialChars, commonTopBorder, commonBottomBorder, commonEmptyLine, padText - from deps.consts import servicesDirectory, templatesDirectory + from deps.consts import volumesDirectory, servicesDirectory, templatesDirectory from deps.common_functions import getExternalPorts, getInternalPorts, checkPortConflicts, enterPortNumberWithWhiptail yaml = ruamel.yaml.YAML() @@ -27,10 +27,11 @@ def main(): global issues # Returned issues dict global haltOnErrors # Turn on to allow erroring global hideHelpText # Showing and hiding the help controls text - global serviceService + global serviceService, serviceVolume serviceService = servicesDirectory + currentServiceName serviceTemplate = templatesDirectory + currentServiceName + serviceVolume = volumesDirectory + currentServiceName try: # If not already set, then set it. hideHelpText = hideHelpText @@ -97,8 +98,9 @@ def preBuild(): # Setup service directory if not os.path.exists(serviceService): os.makedirs(serviceService, exist_ok=True) - os.makedirs(serviceService + '/etc_n8n', exist_ok=True) - os.makedirs(serviceService + '/var_lib_n8n', exist_ok=True) + # Create volume folder and set GID and UID to docker Node user can write. + os.makedirs(serviceVolume , exist_ok=True) + os.chown(serviceVolume, 1000, 1000) return True # ##################################### diff --git a/.templates/n8n/service.yml b/.templates/n8n/service.yml index e3f8bdcc..8249d6a8 100644 --- a/.templates/n8n/service.yml +++ b/.templates/n8n/service.yml @@ -1,19 +1,27 @@ + n8n: container_name: "n8n" restart: unless-stopped ports: - - "5678:5678" - image: n8nio/n8n + - 5678:5678 + image: docker.n8n.io/n8nio/n8n stdin_open: true volumes: - ./volumes/n8n:/home/node/.n8n environment: - TZ=${TZ:-Etc/UTC} - # - PGID=1000 - # - PUID=1000 # - USBDEVICES=/dev/ttyAMA0 # - PACKAGES=mc # Optional DB and Timezone configs. + + #- DB_TYPE=postgresdb + #- DB_POSTGRESDB_DATABASE=postdb + #- DB_POSTGRESDB_HOST=localhost + #- DB_POSTGRESDB_PORT=5432 + #- DB_POSTGRESDB_USER=postuser + #- DB_POSTGRESDB_SCHEMA= + #- DB_POSTGRESDB_PASSWORD= + # - DB_TYPE=mysqldb # - DB_MYSQLDB_DATABASE= # - DB_MYSQLDB_HOST= @@ -26,3 +34,5 @@ n8n: # - N8N_BASIC_AUTH_USER= # - N8N_BASIC_AUTH_PASSWORD= + # Disable https requirement. + - N8N_SECURE_COOKIE=false diff --git a/docs/Containers/N8n.md b/docs/Containers/N8n.md new file mode 100644 index 00000000..c2c1849e --- /dev/null +++ b/docs/Containers/N8n.md @@ -0,0 +1,14 @@ +# N8N, a NodeRed equivalent tool with both Open source support as well as purchased support following the fair-code license model +## References +* [Homepage](https://n8n.io/) +* [Docker](https://docker.n8n.io/n8nio/n8n) +* [Github](https://github.com/n8n-io/n8n) +* [Community](https://community.n8n.io/) + +## Web interface +The web UI can be found on `"http://":5678/` + +## Introduction + +The N8N tool is similr to the Nodered tool where you can create workflows, build scripts and connect to over 200 modules. + \ No newline at end of file