@@ -6,31 +6,6 @@ BACKUP_NAME="backup"
6
6
MODEL_BASE_PATH=" /app/codegate_volume/models"
7
7
CODEGATE_DB_FILE=" /app/codegate_volume/db/codegate.db"
8
8
CODEGATE_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
-
34
9
35
10
# Function to restore backup if paths are provided
36
11
restore_backup () {
@@ -87,11 +62,8 @@ restore_backup
87
62
# Step 2: Generate certificates
88
63
genrerate_certs
89
64
90
- # Step 3: Make CA available to UI
91
- setup_certificate
92
-
93
- # Step 4: Start the dashboard
65
+ # Step 3: Start the dashboard
94
66
start_dashboard
95
67
96
- # Step 5 : Start the main application
97
- start_application
68
+ # Step 4 : Start the main application
69
+ start_application
0 commit comments