chore: Update Dockerfile to fix Teleport installation command and create teleport configuration file
Build and Push Docker Images / build-and-push (push) Successful in 18s

This commit is contained in:
Bram Kelchtermans
2024-08-19 16:55:32 +02:00
parent b45daab3e1
commit f775315645
+8 -6
View File
@@ -80,17 +80,19 @@ git config --global user.email $GIT_EMAIL
# Get the hostname of the machine # Get the hostname of the machine
HOSTNAME=$(hostname) HOSTNAME=$(hostname)
# # File path
# CONFIG_FILE="/etc/teleport.yaml"
# # Edit the teleport.yaml file to update the nodename
# sed -i "s/^ nodename:.*/ nodename: $HOSTNAME/" "$CONFIG_FILE"
## If teleport token is set, join the server ## If teleport token is set, join the server
if [ -n "$TELEPORT_TOKEN" ]; then if [ -n "$TELEPORT_TOKEN" ]; then
rm -rf /etc/teleport.yaml
teleport configure --roles=node --token=$TELEPORT_TOKEN --proxy=$TELEPORT_URL --no-acme -o file teleport configure --roles=node --token=$TELEPORT_TOKEN --proxy=$TELEPORT_URL --no-acme -o file
echo "Created teleport configuration file"
fi fi
# File path
CONFIG_FILE="/etc/teleport.yaml"
# Edit the teleport.yaml file to update the nodename
sed -i "s/^ nodename:.*/ nodename: $HOSTNAME/" "$CONFIG_FILE"
nohup teleport start & nohup teleport start &
# Start the application with pm2 # Start the application with pm2
exec pm2-runtime "yarn start:dev" exec pm2-runtime "yarn start:dev"