From 8ad0aa2fa1bc2a5ef9ab16d386d8be057904287f Mon Sep 17 00:00:00 2001 From: Bram Kelchtermans Date: Sun, 8 Sep 2024 16:08:55 +0200 Subject: [PATCH] chore: Update Dockerfile to fix Teleport installation command and create teleport configuration file --- .../remote-node-container/ecosystem.develop.js | 15 --------------- Dockers/remote-node-container/entrypoint.sh | 6 ++---- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 Dockers/remote-node-container/ecosystem.develop.js diff --git a/Dockers/remote-node-container/ecosystem.develop.js b/Dockers/remote-node-container/ecosystem.develop.js deleted file mode 100644 index 14204af..0000000 --- a/Dockers/remote-node-container/ecosystem.develop.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - apps: [ - { - name: "node-app", - script: "npm", - args: "run dev", - cwd: "/workspace", // Ensure this matches your working directory - instance_var: "NODE", - watch: true, - env: { - NODE_ENV: "development", - }, - }, - ], -}; diff --git a/Dockers/remote-node-container/entrypoint.sh b/Dockers/remote-node-container/entrypoint.sh index 761ed8d..3c61974 100644 --- a/Dockers/remote-node-container/entrypoint.sh +++ b/Dockers/remote-node-container/entrypoint.sh @@ -80,7 +80,6 @@ else echo "Error: Environment file not found at /environment/.dev.env" exit 1 fi - # Set the git user and email git config --global user.name $GIT_USER git config --global user.email $GIT_EMAIL @@ -95,6 +94,5 @@ CONFIG_FILE="/etc/teleport.yaml" sed -i "s/^ nodename:.*/ nodename: $HOSTNAME/" "$CONFIG_FILE" nohup teleport start & - -# Start the application with PM2 using the ecosystem file -exec pm2-runtime start /ecosystems/ecosystem.develop.js +# Start the application with pm2 +exec pm2-runtime "npm run dev"