This commit is contained in:
@@ -24,11 +24,13 @@ spec:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
echo "Waiting for MySQL to be ready..."
|
||||
echo "Waiting for MySQL port to open..."
|
||||
until nc -z mysql 3306; do
|
||||
echo "MySQL is not ready yet, retrying in 3s..."
|
||||
sleep 3
|
||||
echo "MySQL not ready yet, retrying in 5s..."
|
||||
sleep 5
|
||||
done
|
||||
echo "Port open — waiting 15s for MySQL to finish initializing..."
|
||||
sleep 15
|
||||
echo "MySQL is ready!"
|
||||
containers:
|
||||
- name: backend
|
||||
@@ -46,12 +48,12 @@ spec:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mysql-secret
|
||||
key: DB_USER
|
||||
key: MYSQL_USER # matches new secret key
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mysql-secret
|
||||
key: DB_PASSWORD
|
||||
key: MYSQL_PASSWORD # matches new secret key
|
||||
- name: DB_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@@ -70,7 +72,7 @@ spec:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
initialDelaySeconds: 15
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
@@ -78,7 +80,7 @@ spec:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 5
|
||||
Reference in New Issue
Block a user