forked from mtusi2026/mtusi2026lab2
Lab 2
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
docker compose --env-file .env up -d --no-deps --force-recreate app db valkey >/dev/null 2>&1 || {
|
||||
docker compose up -d --no-deps --force-recreate app db valkey
|
||||
}
|
||||
|
||||
echo "Restarted app, postgres and valkey with persisted volumes."
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
default_instance="mtusi-lab2-app"
|
||||
if [[ -n "${TARGET_INSTANCE_ID:-}" ]]; then
|
||||
docker stop "${TARGET_INSTANCE_ID}" >/dev/null 2>&1 || true
|
||||
echo "Stopped ${TARGET_INSTANCE_ID}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
docker stop "${default_instance}" >/dev/null 2>&1 || true
|
||||
printf '%s\n' "Stopped ${default_instance}"
|
||||
Reference in New Issue
Block a user