Skip to content

Commit 79f918a

Browse files
committed
feat: add devops management scripts
1 parent 7703c5b commit 79f918a

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

redeploy.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
cd /d "%~dp0"
3+
echo [INFO] Bringing down all services...
4+
docker compose -f "docker\docker-compose.yml" down
5+
6+
echo [INFO] Starting all services...
7+
docker compose -f "docker\docker-compose.yml" up -d
8+
9+
echo [INFO] Waiting for services to be ready...
10+
timeout /t 5 /nobreak >nul
11+
12+
echo [INFO] Service status:
13+
docker compose -f "docker\docker-compose.yml" ps
14+
15+
echo [INFO] Recent API logs:
16+
docker compose -f "docker\docker-compose.yml" logs api --tail 20
17+
18+
pause

redeploy.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
3+
COMPOSE_FILE="$SCRIPT_DIR/docker/docker-compose.yml"
4+
5+
echo "[INFO] Bringing down all services..."
6+
docker compose -f "$COMPOSE_FILE" down
7+
8+
echo "[INFO] Starting all services..."
9+
docker compose -f "$COMPOSE_FILE" up -d
10+
11+
echo "[INFO] Waiting for services to be ready..."
12+
sleep 5
13+
14+
echo "[INFO] Service status:"
15+
docker compose -f "$COMPOSE_FILE" ps
16+
17+
echo "[INFO] Recent API logs:"
18+
docker compose -f "$COMPOSE_FILE" logs api --tail 20
19+
20+
read -p "Press Enter to close..."

restart_api.bat

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
cd /d "%~dp0"
3+
echo [INFO] Restarting API and Sidekiq containers (reloading env vars)...
4+
docker compose -f "docker\docker-compose.yml" up -d --force-recreate api sidekiq
5+
6+
echo [INFO] Waiting for services to be ready...
7+
timeout /t 3 /nobreak >nul
8+
9+
echo [INFO] Recent logs (api):
10+
docker logs prostaff-api --tail 10
11+
12+
echo [INFO] Recent logs (sidekiq):
13+
docker logs docker-sidekiq-1 --tail 10
14+
15+
pause

restart_api.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
3+
COMPOSE_FILE="$SCRIPT_DIR/docker/docker-compose.yml"
4+
5+
echo "[INFO] Restarting API and Sidekiq containers (reloading env vars)..."
6+
docker compose -f "$COMPOSE_FILE" up -d --force-recreate api sidekiq
7+
8+
echo "[INFO] Waiting for services to be ready..."
9+
sleep 3
10+
11+
echo "[INFO] Recent logs (api):"
12+
docker logs prostaff-api --tail 10
13+
14+
echo "[INFO] Recent logs (sidekiq):"
15+
docker logs docker-sidekiq-1 --tail 10
16+
17+
read -p "Press Enter to close..."

0 commit comments

Comments
 (0)