Skip to content

Commit 08a4283

Browse files
authored
Merge pull request #18 from geniusdynamics/dev
Dev
2 parents 01cd597 + 2318194 commit 08a4283

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

imageroot/actions/create-module/10configure_environment_vars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ POSTGRES_USER_USERNAME = "zitadel"
4141
POSTGRES_USER_PASSWORD = generate_random_password()
4242

4343
postgres_config = {
44+
"POSTGRES_DB": POSTGRES_DB,
4445
"POSTGRES_USER": POSTGRES_USER,
4546
"POSTGRES_PASSWORD": POSTGRES_PASSWORD,
4647
}

imageroot/actions/restore-module/40restore-postgres

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@
88
set -e -o pipefail
99
exec 1>&2 # Redirect any output to the journal (stderr)
1010

11-
mkdir -vp restore
12-
cat - >restore/zitadel_restore.sh <<'EOS'
13-
# Read dump file from standard input:
14-
pg_restore --no-owner --no-privileges -U postgres -d zitadel
15-
ec=$?
16-
docker_temp_server_stop
17-
exit $ec
18-
EOS
11+
# mkdir -vp restore
12+
# cat - >restore/zitadel_restore.sh <<'EOS'
13+
# # Read dump file from standard input:
14+
# pg_restore -U postgres -d zitadel
15+
# ec=$?
16+
# docker_temp_server_stop
17+
# exit $ec
18+
# EOS
1919

2020
# Override the image /docker-entrypoint-initdb.d contents, to restore the
2121
# DB dump file. The container will be stopped at the end
2222

23-
podman run \
24-
--rm \
25-
--interactive \
26-
--network=none \
27-
--volume=./restore:/docker-entrypoint-initdb.d/:Z \
28-
--volume=postgres-data:/var/lib/postgresql/data:Z \
29-
--replace --name=restore_db \
30-
--env-file=database.env \
31-
--env TZ=UTC \
32-
"${POSTGRES_IMAGE}" < zitadel.pg_dump
33-
34-
# If the restore is successful, clean up:
35-
rm -rfv restore/ zitadel.pg_dump
23+
# podman run \
24+
# --rm \
25+
# --interactive \
26+
# --network=none \
27+
# --volume=./restore:/docker-entrypoint-initdb.d/:Z \
28+
# --volume=postgres-data:/var/lib/postgresql/data:Z \
29+
# --replace --name=restore_db \
30+
# --env-file=database.env \
31+
# --env TZ=UTC \
32+
# "${POSTGRES_IMAGE}" <zitadel.pg_dump
33+
#
34+
# # If the restore is successful, clean up:
35+
# rm -rfv restore/ zitadel.pg_dump

imageroot/etc/state-include.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ state/smarthost.env
99
state/zitadel.env
1010
state/zitadel-app.env
1111
state/database.env
12-
state/zitadel.pg_dump
12+
state/zitadel.pg_dump
13+
volumes/postgres-data

0 commit comments

Comments
 (0)