diff --git a/Dockers/remote-react-container/entrypoint.sh b/Dockers/remote-react-container/entrypoint.sh index 4610925..c616fcc 100644 --- a/Dockers/remote-react-container/entrypoint.sh +++ b/Dockers/remote-react-container/entrypoint.sh @@ -13,18 +13,16 @@ if [ ! -f /root/.ssh/id_rsa ]; then exit 1 fi -if [ -z $GIT_USER ]; then +if [ -z $GIT_USER ]; then echo "Error: GIT_USER environment variable must be set." exit 1 fi -if [ -z $GIT_EMAIL ]; then +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 @@ -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 diff --git a/Dockers/remote-react-container/version b/Dockers/remote-react-container/version new file mode 100644 index 0000000..415b19f --- /dev/null +++ b/Dockers/remote-react-container/version @@ -0,0 +1 @@ +2.0 \ No newline at end of file