From dc7889cc6ae6abdc371bfd74a35d3e1a68d65ed0 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Mon, 29 Dec 2025 00:55:26 +0000 Subject: [PATCH] Improved deployment. --- Jenkinsfile | 5 +++-- config.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bd1379a..700c25d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,6 +36,7 @@ pipeline { nodejs(nodeJSInstallationName: 'Node23') { sh ''' export NODE_ENV=test + export SESSION_SECRET=test-session-secret-for-testing-only yarn test ''' } @@ -57,9 +58,9 @@ pipeline { cleanRemote: false, excludes: 'node_modules/**', execCommand: ''' - cd /opt/farmcontrol-api + cd /home/farmcontrol/farmcontrol-api yarn install --production - pm2 restart ecosystem.config.js --env production || pm2 start ecosystem.config.js --env production + sudo systemctl restart farmcontrol-api ''', execTimeout: 120000, flatten: false, diff --git a/config.json b/config.json index 78462b0..2e8a92c 100644 --- a/config.json +++ b/config.json @@ -55,6 +55,7 @@ }, "auth": { "enabled": false, + "sessionSecret": "test-session-secret-for-testing-only", "keycloak": { "url": "http://localhost:8080", "realm": "test",