File size: 535 Bytes
8712117
 
de3cdcb
8712117
 
 
de3cdcb
8712117
 
 
 
de3cdcb
 
 
 
8712117
 
de3cdcb
8712117
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# 1. Start the MySQL/MariaDB service
service mariadb start
sleep 3

# 2. Setup master database credentials
mysql -e "CREATE USER IF NOT EXISTS 'admin'@'localhost' IDENTIFIED BY 'orchestrator_master_pass';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;"
mysql -e "FLUSH PRIVILEGES;"

# 3. Ensure Nginx can read the repository files
chown -R www-data:www-data /app

# 4. Start PHP FastCGI
service php8.1-fpm start

# 5. Start Nginx
echo "Starting Nginx web server..."
nginx -g "daemon off;"