From 858d437f3fe2e23b4f31e6ad3ba6165caea7b5da Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 23 Oct 2022 00:11:03 +0700 Subject: [PATCH] simplify local production deployment --- deploy.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/deploy.sh b/deploy.sh index 696ee4eb..cbf501dc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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' }