chore: Update Dockerfile to use .env file for environment variables
Build and Push Docker Images / build-and-push (push) Successful in 7m52s

This commit is contained in:
2024-08-15 14:31:27 +02:00
parent 8a92baf120
commit 1a835cc99c
2 changed files with 6 additions and 8 deletions
+3 -6
View File
@@ -23,8 +23,6 @@ if [ -z $GIT_EMAIL ]; then
exit 1
fi
# Ensure the SSH key has the correct permissions
chmod 600 /root/.ssh/id_rsa
@@ -38,14 +36,14 @@ if [ ! -d "/workspace/.git" ]; then
HostName $DOMAIN
IdentityFile /root/.ssh/id_rsa
StrictHostKeyChecking no
" >> /root/.ssh/config
" >>/root/.ssh/config
# Clone the repository if it doesn't exist
git clone $REPO_URL /workspace
fi
# Add the public SSH key to authorized_keys
if [ -f /root/.ssh/hostkey.pub ]; then
cat /root/.ssh/hostkey.pub >> /root/.ssh/authorized_keys
cat /root/.ssh/hostkey.pub >>/root/.ssh/authorized_keys
fi
# Change to the repository directory
@@ -59,8 +57,7 @@ if [ -f /environment/.dev.env ]; then
mkdir -p /workspace/environments
cp /environment/.dev.env /workspace/environments/.dev.env
else
echo "Error: Environment file not found at /environment/.dev.env"
exit 1
echo "Environment file not found at /environment/.dev.env"
fi
# Set the git user and email
git config --global user.name $GIT_USER
+1
View File
@@ -0,0 +1 @@
2.0