-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
executable file
·32 lines (24 loc) · 994 Bytes
/
docker-entrypoint.sh
File metadata and controls
executable file
·32 lines (24 loc) · 994 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/sh
set -eo pipefail
if [ -d /mnt/ssh ]; then
mkdir -p /home/www-data/.ssh
cp /mnt/ssh/* /home/www-data/.ssh/
chown -R www-data:www-data /home/www-data/.ssh
chmod -R 700 /home/www-data/.ssh
fi
if [ -n "$PHP_SENDMAIL_PATH" ]; then
sed -i 's@^;sendmail_path.*@'"sendmail_path = ${PHP_SENDMAIL_PATH}"'@' /etc/php7/php.ini
fi
if [ "$PHP_XDEBUG_ENABLED" -eq "1" ]; then
sed -i 's/^;zend_extension.*/zend_extension = xdebug.so/' /etc/php7/conf.d/00_xdebug.ini
fi
if [ "$PHP_XDEBUG_AUTOSTART" -eq "0" ]; then
sed -i 's/^xdebug.remote_autostart.*/xdebug.remote_autostart = 0/' /etc/php7/conf.d/00_xdebug.ini
fi
if [ "$PHP_XDEBUG_REMOTE_CONNECT_BACK" -eq "0" ]; then
sed -i 's/^xdebug.remote_connect_back.*/xdebug.remote_connect_back = 0/' /etc/php7/conf.d/00_xdebug.ini
fi
if [ -n "$PHP_XDEBUG_REMOTE_HOST" ]; then
sed -i 's/^xdebug.remote_host.*/'"xdebug.remote_host = ${PHP_XDEBUG_REMOTE_HOST}"'/' /etc/php7/conf.d/00_xdebug.ini
fi
exec php-fpm