simplify local production deployment

This commit is contained in:
simon 2022-10-23 00:11:03 +07:00
parent de30ac302a
commit 858d437f3f
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 2 additions and 6 deletions

View File

@ -18,11 +18,7 @@ set -e
function sync_blackhole {
# docker commands need sudo, only build amd64
host="blackhole.local"
read -sp 'Password: ' remote_pw
export PASS=$remote_pw
rsync -a --progress --delete-after \
--exclude ".git" \
@ -32,8 +28,8 @@ function sync_blackhole {
--exclude "db.sqlite3" \
. -e ssh "$host":tubearchivist
echo "$PASS" | ssh "$host" 'sudo -S docker buildx build --platform linux/amd64 -t bbilly1/tubearchivist:latest tubearchivist --load 2>/dev/null'
echo "$PASS" | ssh "$host" 'sudo -S docker compose up -d 2>/dev/null'
ssh "$host" 'docker build -t bbilly1/tubearchivist tubearchivist'
ssh "$host" 'docker compose up -d'
}