-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ -z "$AUTO_UPDATE_BRANCH" ];then | ||
# auto update not configured | ||
exit 0 | ||
fi | ||
|
||
cd /opt/Internet.nl/ | ||
|
||
# shellcheck disable=SC1091 | ||
. docker/local.env | ||
|
||
CURRENT_SHA="$RELEASE" | ||
UPSTREAM_SHA="$(curl -sSLf "https://api.github.com/repos/internetstandards/Internet.nl/branches/$AUTO_UPDATE_BRANCH"| jq -r .commit.sha)" | ||
|
||
if [ "$CURRENT_SHA" = "$UPSTREAM_SHA" ];then | ||
# no update available | ||
exit 0 | ||
fi | ||
|
||
env -i RELEASE="$UPSTREAM_SHA" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env --profile update up --no-build update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
cd /opt/Internet.nl/ | ||
|
||
echo "Updating to release: $RELEASE" | ||
|
||
curl --silent --show-error --fail --remote-name --location --max-redirs 0 --output-dir docker \ | ||
"https://raw.githubusercontent.com/internetstandards/Internet.nl/${RELEASE}/docker/defaults.env" | ||
curl --silent --show-error --fail --remote-name --location --max-redirs 0 --output-dir docker \ | ||
"https://raw.githubusercontent.com/internetstandards/Internet.nl/${RELEASE}/docker/docker-compose.yml" | ||
env -i RELEASE="$RELEASE" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env pull | ||
env -i RELEASE="$RELEASE" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env up --remove-orphans --wait --no-build | ||
|
||
echo "RELEASE=$RELEASE # auto-update: '$AUTO_UPDATE_BRANCH' $(date)" >> docker/local.env | ||
|
||
echo "Update completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters