mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 20:29:36 +00:00
add unstable tag for docker deploy
This commit is contained in:
26
deploy.sh
26
deploy.sh
@@ -3,7 +3,8 @@
|
||||
# deploy all needed project files to different servers:
|
||||
# test for local vm for testing
|
||||
# blackhole for local production
|
||||
# docker to publish
|
||||
# unstable to publish intermediate releases
|
||||
# docker to publish regular release
|
||||
|
||||
# create builder:
|
||||
# docker buildx create --name tubearchivist
|
||||
@@ -51,7 +52,8 @@ function sync_test {
|
||||
--exclude "db.sqlite3" \
|
||||
. -e ssh "$host":tubearchivist
|
||||
|
||||
rsync -r --progress --delete docker-compose.yml -e ssh "$host":docker
|
||||
# uncomment or copy your own docker-compose file
|
||||
# rsync -r --progress --delete docker-compose.yml -e ssh "$host":docker
|
||||
|
||||
if [[ $1 = "amd64" ]]; then
|
||||
platform="linux/amd64"
|
||||
@@ -100,6 +102,22 @@ function validate {
|
||||
}
|
||||
|
||||
|
||||
# publish unstable tag to docker
|
||||
function sync_unsable {
|
||||
|
||||
if [[ $(systemctl is-active docker) != 'active' ]]; then
|
||||
echo "starting docker"
|
||||
sudo systemctl start docker
|
||||
fi
|
||||
|
||||
# start amd64 build
|
||||
sudo docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
-t bbilly1/tubearchivist:unstable --push .
|
||||
|
||||
}
|
||||
|
||||
|
||||
function sync_docker {
|
||||
|
||||
# check things
|
||||
@@ -152,8 +170,10 @@ elif [[ $1 == "validate" ]]; then
|
||||
validate "$2"
|
||||
elif [[ $1 == "docker" ]]; then
|
||||
sync_docker
|
||||
elif [[ $1 == "unstable" ]]; then
|
||||
sync_unsable
|
||||
else
|
||||
echo "valid options are: blackhole | test | validate | docker"
|
||||
echo "valid options are: blackhole | test | validate | docker | unstable"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user