chore: Update Dockerfile to remove unnecessary SSH server configuration
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
git clone https://gitea.bramkelchtermans.be/Bram/linux-presets.git && cd linux-presets && chmod +x setup.sh && ./setup.sh --terminal-icon
|
||||
rm -r linux-presets/
|
||||
|
||||
# Check if the required environment variables are set
|
||||
if [ -z "$REPO_URL" ]; then
|
||||
echo "Error: REPO_URL environment variable must be set."
|
||||
@@ -16,6 +13,18 @@ if [ ! -f /root/.ssh/id_rsa ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $GIT_USER ]; then
|
||||
echo "Error: GIT_USER environment variable must be set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $GIT_EMAIL ]; then
|
||||
echo "Error: GIT_EMAIL environment variable must be set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Ensure the SSH key has the correct permissions
|
||||
chmod 600 /root/.ssh/id_rsa
|
||||
|
||||
@@ -53,6 +62,18 @@ 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
|
||||
|
||||
# Get the hostname of the machine
|
||||
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"
|
||||
|
||||
nohup teleport start &
|
||||
# Start the application with pm2
|
||||
|
||||
Reference in New Issue
Block a user