Implement PostgreSQL storage, sessions and persistence checks
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
snapshot() {
|
||||
for service in api postgres; do
|
||||
id=$(docker compose ps -q "$service")
|
||||
test -n "$id"
|
||||
docker inspect --format '{{.Name}} {{.Id}} {{.State.StartedAt}} {{.State.Status}} {{range .Mounts}}{{if eq .Type "volume"}}{{.Name}} {{end}}{{end}}' "$id"
|
||||
done
|
||||
}
|
||||
|
||||
snapshot > evidence/restart-containers-before.txt
|
||||
docker compose stop api postgres
|
||||
docker compose up -d --wait postgres
|
||||
docker compose up -d --wait api
|
||||
snapshot > evidence/restart-containers-after.txt
|
||||
printf '%s\n' 'API and PostgreSQL restarted without removing volumes.'
|
||||
Reference in New Issue
Block a user