-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
39 lines (28 loc) · 931 Bytes
/
entrypoint.sh
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
36
37
38
39
#!/bin/bash
echo "Start entrypoint file"
echo "APACHE_REMOTE_IP_HEADER: ${APACHE_REMOTE_IP_HEADER}"
echo "APACHE_REMOTE_IP_TRUSTED_PROXY: ${APACHE_REMOTE_IP_TRUSTED_PROXY}"
echo "APACHE_REMOTE_IP_INTERNAL_PROXY: ${APACHE_REMOTE_IP_INTERNAL_PROXY}"
echo "Setup TZ"
php -r "date_default_timezone_set('${TZ}');"
php -r "echo date_default_timezone_get();"
if [ -f /vault/secrets/secrets.env ]; then
touch .env && cp -rf /vault/secrets/secrets.env /var/www/html/.env
fi
if [ -f /vault/secrets/test-secrets.env ]; then
touch .env && cp -rf /vault/secrets/test-secrets.env /var/www/html/.env
fi
echo "ENV_ARG: ${ENV_ARG}"
echo "Install composer"
composer dump-auto
chmod 766 /var/www/html/probe-check.sh
echo "Permissions setup for NPM:"
chmod -R a+w node_modules
echo "Starting apache:"
/usr/sbin/apache2ctl start
echo "Restarting apache:"
/usr/sbin/apache2ctl restart
echo "End entrypoint"
while :; do
sleep 300
done