forked from mtusi2026/mtusi2026lab4
Implement lab4 S3 attachments and resilience
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "Stopping API replicas..."
|
||||
docker compose stop api1 api2
|
||||
|
||||
echo "Restarting PostgreSQL and S3..."
|
||||
docker compose restart db minio
|
||||
|
||||
echo "Waiting for PostgreSQL..."
|
||||
docker compose up -d --wait db
|
||||
|
||||
echo "Checking S3 bucket..."
|
||||
docker compose run --rm --no-deps s3-init
|
||||
|
||||
echo "Starting API replicas..."
|
||||
docker compose up -d --wait api1 api2
|
||||
|
||||
echo "Restart complete. Volumes preserved."
|
||||
Reference in New Issue
Block a user