-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
32 lines (22 loc) · 870 Bytes
/
docker-entrypoint.sh
File metadata and controls
32 lines (22 loc) · 870 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
#!/bin/bash
[ "$DEBUG" = "true" ] && set -x
if [ ! -z "${CRONTAB}" ]; then
echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log
fi
PHP_EXT_DIR=/usr/local/etc/php/conf.d
# Enable PHP extensions
PHP_EXT_COM_ON=docker-php-ext-enable
[ -d ${PHP_EXT_DIR} ] && rm -f ${PHP_EXT_DIR}/docker-php-ext-*.ini
if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; then
${PHP_EXT_COM_ON} ${PHP_EXTENSIONS}
fi
# Configure composer
[ ! -z "${COMPOSER_VERSION}" ] && \
composer clearcache && \
composer self-update $COMPOSER_VERSION
[ ! -z "${COMPOSER_GITHUB_TOKEN}" ] && \
composer config --global github-oauth.github.com $COMPOSER_GITHUB_TOKEN
[ ! -z "${COMPOSER_MAGENTO_USERNAME}" ] && \
composer config --global http-basic.repo.magento.com \
$COMPOSER_MAGENTO_USERNAME $COMPOSER_MAGENTO_PASSWORD
exec "$@"