n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
48.94k stars 7.77k forks source link

docker-entrypoint.sh startup script has incorrect export statement #10913

Open rthomas6charter opened 1 month ago

rthomas6charter commented 1 month ago

Bug Description

Issue

Docker startup script fails if both self-signed certificates and NODE_OPTIONS env variable are in effect.

Probable Solution

This: https://github.com/n8n-io/n8n/blob/master/docker/images/n8n/docker-entrypoint.sh#L4 ...needs quotes around the value in the export statement so the part after the space isn't interpreted as a separate argument.

To Reproduce

  1. Add one or more .pem files to /opt/custom-certificates
    • OPTION 1: Mount a volume to that path for the container
    • OPTION 2: Create another container image layer with the custom-certificates added
  2. Run the n8n container with the following env variable set:
    • NODE_OPTIONS=--max-old-space-size=2048

Expected behavior

Normal startup with effective env variable set to:

Operating System

Official Docker Container - Base Image (Alpine?) linux/arm64

n8n Version

1.46.0

Node.js Version

18.19.1

Database

PostgreSQL

Execution mode

main (default)

Joffcom commented 1 month ago

Hey @rthomas6charter,

We have created an internal ticket to look into this which we will be tracking as "GHC-246"