diff --git a/30-run-rebased.sh b/30-run-rebased.sh index 4a77c9d..490dd3c 100755 --- a/30-run-rebased.sh +++ b/30-run-rebased.sh @@ -1,12 +1,16 @@ #!/bin/bash source ./script_config.sh +touch ./config/prod.secret.exs echo Stopping old 'rebased-web' container... podman stop rebased-web podman rm rebased-web echo Creating new 'rebased-web' container... +if [ ! -f ./config/prod.secret.exs ]; then + $conf="" +fi podman run -d \ --name rebased-web \ --pod rebased-pod \ diff --git a/db_backup.sh b/db_backup.sh new file mode 100755 index 0000000..40bb59c --- /dev/null +++ b/db_backup.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +podman exec rebased-db pg_dump -U pleroma pleroma > db.sql diff --git a/db_restore.sh b/db_restore.sh new file mode 100755 index 0000000..4ce8ce9 --- /dev/null +++ b/db_restore.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +podman exec rebased-db psql -U pleroma pleroma < db.sql + diff --git a/script_config.sh b/script_config.sh index f9f1c57..0d3f8b7 100644 --- a/script_config.sh +++ b/script_config.sh @@ -1,10 +1,10 @@ #!/bin/bash DATE=$(date +"%Y-%m-%d") -PG_USER=rebased +PG_USER=pleroma PG_PASS=rebased PG_HOST=localhost -PG_NAME=rebased +PG_NAME=pleroma REBASED_VER=develop REBASED_IMG="rebased-$REBASED_VER-$DATE" diff --git a/take_backup.sh b/take_backup.sh deleted file mode 100755 index c2a6477..0000000 --- a/take_backup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -podman exec pleroma-db pg_dump -U pleroma pleroma > db.sql