forked from mtusi2026/mtusi2026lab2
реализован уровень 4
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
project_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
cd "$project_root"
|
||||
|
||||
env_file=${ENV_FILE:-.env}
|
||||
|
||||
case "${DATABASE_ACTION:-}" in
|
||||
stop)
|
||||
docker compose --env-file "$env_file" stop postgres
|
||||
;;
|
||||
start)
|
||||
docker compose --env-file "$env_file" up -d --wait postgres
|
||||
;;
|
||||
*)
|
||||
echo "DATABASE_ACTION must be stop or start" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user