-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
35 lines (27 loc) · 938 Bytes
/
Copy pathbootstrap.sh
File metadata and controls
35 lines (27 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Waiting to run the file operations until database is up
until nc -z -v -w30 naturallydb 3306
do
echo "Waiting for database connection..."
sleep 10
done
# Install composer dependencies and set basic Laravel config
composer install
php artisan key:generate
php artisan config:cache
# Setting up database
php artisan migrate:fresh
# Creating project password grant client and personal access client to handle oauth2 authenctication
php artisan passport:install
# Setting files and dir permissions to work inside container with root
chmod 775 /var/www/storage/logs
chown -R root:www-data /var/www/storage
# Creating symbolic links of the project
php artisan storage:link
# Cleaning project caches
php artisan config:cache
php artisan cache:clear
# Fixing some storage permissions
chmod -R gu+w storage
chmod -R guo+w storage
# Cleaning application cache again to make sure all alterations are up-to-date
php artisan cache:clear