Merge azure_deploy.sh into caprover_deploy.sh
This commit is contained in:
parent
b967147ff5
commit
df9b608d6e
|
|
@ -44,6 +44,11 @@ fi
|
||||||
npm run build
|
npm run build
|
||||||
python server/manage.py collectstatic --no-input
|
python server/manage.py collectstatic --no-input
|
||||||
|
|
||||||
|
if [[ "$APP_NAME" == "prod-azure" ]]; then
|
||||||
|
# build and push azure docker container
|
||||||
|
docker build --platform linux/amd64 -f compose/django/Dockerfile -t iterativ/vbv-lernwelt-django:azure .
|
||||||
|
docker image push iterativ/vbv-lernwelt-django:azure
|
||||||
|
else
|
||||||
# create and push new docker container
|
# create and push new docker container
|
||||||
VERSION=$(git log -1 --pretty=%h)
|
VERSION=$(git log -1 --pretty=%h)
|
||||||
REPO="iterativ/vbv-lernwelt-django"
|
REPO="iterativ/vbv-lernwelt-django"
|
||||||
|
|
@ -53,12 +58,6 @@ VERSION_TAG="${REPO}:$VERSION"
|
||||||
docker build --platform=linux/amd64 -f compose/django/Dockerfile -t "$REPO" -t "$LATEST" -t "$VERSION_TAG" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" --build-arg GIT_COMMIT="$(git log -1 --format=%h)" .
|
docker build --platform=linux/amd64 -f compose/django/Dockerfile -t "$REPO" -t "$LATEST" -t "$VERSION_TAG" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" --build-arg GIT_COMMIT="$(git log -1 --format=%h)" .
|
||||||
docker push "$VERSION_TAG"
|
docker push "$VERSION_TAG"
|
||||||
|
|
||||||
if [[ "$APP_NAME" == "vbv-azure" ]]; then
|
|
||||||
# build and push azure docker container
|
|
||||||
docker build --platform linux/amd64 -f compose/django/Dockerfile -t iterativ/vbv-lernwelt-django:azure .
|
|
||||||
docker image push iterativ/vbv-lernwelt-django:azure
|
|
||||||
fi
|
|
||||||
|
|
||||||
# caprover specific deployment
|
# caprover specific deployment
|
||||||
APP_URL="$APP_NAME.control.iterativ.ch"
|
APP_URL="$APP_NAME.control.iterativ.ch"
|
||||||
|
|
||||||
|
|
@ -77,3 +76,4 @@ if [ -n "$CI" ]; then
|
||||||
export CAPROVER_APP_URL="$APP_URL"
|
export CAPROVER_APP_URL="$APP_URL"
|
||||||
echo "https://$CAPROVER_APP_URL" >/tmp/caprover_app_url.txt
|
echo "https://$CAPROVER_APP_URL" >/tmp/caprover_app_url.txt
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue