@@ -6,31 +6,6 @@ BACKUP_NAME="backup"
66MODEL_BASE_PATH=" /app/codegate_volume/models"
77CODEGATE_DB_FILE=" /app/codegate_volume/db/codegate.db"
88CODEGATE_CERTS=" /app/codegate_volume/certs"
9- NGINX_CA_CERT=" /usr/share/nginx/html/certificates"
10-
11- # Function to ensure the certificates directory exists and copy the certificate
12- setup_certificate () {
13- echo " Ensuring the Nginx certificates directory exists..."
14- mkdir -p " $NGINX_CA_CERT " # Ensure the directory exists
15-
16- # Check if the source certificate exists
17- if [ ! -f " $CODEGATE_CERTS /ca.crt" ]; then
18- echo " Error: Certificate file not found at $CODEGATE_CERTS /ca.crt"
19- exit 1
20- fi
21-
22- echo " Copying CA certificate to $NGINX_CA_CERT ..."
23- cp " $CODEGATE_CERTS /ca.crt" " $NGINX_CA_CERT /codegate_ca.crt"
24-
25- # Verify the copy was successful
26- if [ -f " $NGINX_CA_CERT /codegate_ca.crt" ]; then
27- echo " CA certificate successfully copied to $NGINX_CA_CERT "
28- else
29- echo " Error: Failed to copy CA certificate."
30- exit 1
31- fi
32- }
33-
349
3510# Function to restore backup if paths are provided
3611restore_backup () {
@@ -87,11 +62,8 @@ restore_backup
8762# Step 2: Generate certificates
8863genrerate_certs
8964
90- # Step 3: Make CA available to UI
91- setup_certificate
92-
93- # Step 4: Start the dashboard
65+ # Step 3: Start the dashboard
9466start_dashboard
9567
96- # Step 5 : Start the main application
97- start_application
68+ # Step 4 : Start the main application
69+ start_application
0 commit comments