Skip to content

Commit

Permalink
add autosetup
Browse files Browse the repository at this point in the history
  • Loading branch information
reschandreas committed Dec 26, 2023
1 parent 9017083 commit b89403a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deployment/aeolus-docker
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ function start {
cd $WORKING_DIR || exit
git clone https://github.com/ls1intum/Aeolus.git -b "$pr_branch" Aeolus
sed -i "s/AEOLUS_DOCKER_TAG=.*/AEOLUS_DOCKER_TAG='$pr_tag'/g" $ENV_FILE
if [ ! -f "$WORKING_DIR/docker.env" ]; then
wget -o "$WORKING_DIR/docker.env" https://raw.githubusercontent.com/ls1intum/Aeolus/develop/.env.example
sed -i "s/AEOLUS_DOCKER_TAG=.*/AEOLUS_DOCKER_TAG='$pr_tag'/g" $WORKING_DIR/docker.env
local _hostname
_hostname=$(hostname)
sed -i "s/AEOLUS_HOST=.*/AEOLUS_HOST='${_hostname}'/g" $WORKING_DIR/docker.env
fi
if [ ! -f "$WORKING_DIR/acme.json" ]; then
touch "$WORKING_DIR/acme.json"
chmod 600 "$WORKING_DIR/acme.json"
Expand All @@ -42,14 +49,13 @@ function start {
}

function stop {
# TODO: In the future extract pr_tag and pr_branch from env

echo "Stopping aeolus"
docker compose -f "$PROJECT_DIR/$COMPOSE_FILE" --env-file "$ENV_FILE" down
}

function restart {
stop "$@"
sleep 1
start "$@"
}

Expand Down

0 comments on commit b89403a

Please sign in to comment.