mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-25 11:11:02 +00:00
n8n: refactor environmentfile (#6297)
* n8n: add config path * n8n: refactor servicefile to seperate env * n8n: refactor envfile * Update n8n.sh * Update n8n.json --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
14
ct/n8n.sh
14
ct/n8n.sh
@@ -34,6 +34,18 @@ function update_script() {
|
||||
echo "Installed NPM..."
|
||||
fi
|
||||
fi
|
||||
if [ ! -f /opt/n8n.env ]; then
|
||||
sed -i 's|^Environment="N8N_SECURE_COOKIE=false"$|EnvironmentFile="/opt/n8n.env"|' /etc/systemd/system/n8n.service
|
||||
HOST_IP=$(hostname -I | awk '{print $1}')
|
||||
mkdir -p /opt
|
||||
cat <<EOF >/opt/n8n.env
|
||||
N8N_SECURE_COOKIE=false
|
||||
N8N_PORT=5678
|
||||
N8N_PROTOCOL=http
|
||||
N8N_HOST=$HOST_IP
|
||||
EOF
|
||||
fi
|
||||
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD npm update -g n8n
|
||||
systemctl restart n8n
|
||||
@@ -48,4 +60,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5678${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5678${CL}"
|
||||
|
Reference in New Issue
Block a user