Pepguy commited on
Commit
830b409
·
verified ·
1 Parent(s): 24634dc

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +11 -12
start.sh CHANGED
@@ -2,20 +2,19 @@
2
 
3
  echo "===== Application Startup at $(date) ====="
4
 
5
- # --- Step 1: Start Valkey (Redis fork) ---
6
- echo "[INFO] Starting Valkey server..."
7
- valkey-server /etc/valkey/valkey.conf --daemonize yes
8
- echo "[INFO] Valkey server started."
9
 
10
- # --- Step 2: Wait for Valkey to be ready ---
11
- echo "[INFO] Waiting for Valkey to be ready..."
12
- until valkey-cli -h 127.0.0.1 -p 6379 ping | grep -q "PONG"
13
- do
14
- echo "[INFO] Waiting for Valkey to respond..."
15
  sleep 2
16
  done
17
- echo "[SUCCESS] Valkey is ready."
18
 
19
- # --- Step 3: Start Bun app ---
20
- echo "[INFO] Starting Bun app..."
21
  exec bun run app.js
 
2
 
3
  echo "===== Application Startup at $(date) ====="
4
 
5
+ # --- Step 1: Start Redis server ---
6
+ echo "[INFO] Starting Redis server..."
7
+ redis-server --daemonize yes
8
+ echo "[INFO] Redis server started."
9
 
10
+ # --- Step 2: Wait for Redis to be ready ---
11
+ echo "[INFO] Waiting for Redis to respond to PING..."
12
+ until redis-cli ping | grep -q "PONG"; do
13
+ echo "[INFO] Redis not ready yet..."
 
14
  sleep 2
15
  done
16
+ echo "[SUCCESS] Redis is ready."
17
 
18
+ # --- Step 3: Start Bun application ---
19
+ echo "[INFO] Launching Bun app..."
20
  exec bun run app.js