-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-entrypoint.sh
29 lines (26 loc) · 993 Bytes
/
docker-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
#!/usr/bin/env bash
if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then
if [ ! -e /usr/src/app/vendor ]; then
echo "INSTALLING DEPENDENCIES with composer install"
cd /usr/src/app && composer install
fi
if [ ! -e /usr/src/app/node_modules ]; then
echo "INSTALLING DEPENDENCIES with yarn install"
cd /usr/src/app && yarn install
fi
echo "SETTING APIKEY= $APIKEY"
export APIKEY=$APIKEY
echo "SETTING MODEL= $MODEL"
export MODEL=$MODEL
export PORTAINER_USERNAME=$PORTAINER_USERNAME
export PORTAINER_PASSWORD=$PORTAINER_PASSWORD
export PORTAINER_URL=$PORTAINER_URL
export MAIL_HOST=$MAIL_HOST
export MAIL_PORT=$MAIL_PORT
export MAIL_USERNAME=$MAIL_USERNAME
export MAIL_PASSWORD=$MAIL_PASSWORD
export MAIL_FROM=$MAIL_FROM
cd /usr/src/app && yarn encore production
fi
echo "STARTING APACHE"
exec "$@"