forked from VATUSA/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
23 lines (17 loc) · 780 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
cat /run/secrets/key > /www/.env
cat /run/secrets/*.env >> /www/.env
cat /run/secrets/sso.rsa >> /www/.sso.rsa
chown application:application /www/.env
mkdir /www/storage/logs
chown application:application /www/storage/logs
chmod 600 /run/secrets/*.key
chown application:application /run/secrets/*.key
if [[ "$WWW_ENV" == "prod" ]] || [[ "$WWW_ENV" == "livedev" ]] || [[ "$WWW_ENV" == "staging" ]]; then
# echo "* * * * * cd /www && php artisan schedule:run" >> /etc/crontabs/application
cd /www && php artisan migrate --force
chown -R application:application /www/storage/logs
chmod -R 777 /www/storage/logs
chmod -R 777 /www/storage/app/purifier/ # HTML Purifier
fi
/usr/bin/supervisord --nodaemon --configuration /etc/supervisord.conf