-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·39 lines (26 loc) · 910 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·39 lines (26 loc) · 910 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
33
34
35
36
37
38
39
#!/bin/bash
echo -e "Fixing permissions..."
usermod -o --uid ${OWNER_UID} www-data
groupmod -o --gid ${OWNER_GID} www-data
chown -R www-data:www-data /var/www/html/
if ! command -v wget &>/dev/null; then
echo -e "Install Wget"
apt-get update
apt-get install wget -y
fi
if ! command -v composer &>/dev/null; then
echo -e "Install Composer"
wget -O composer-setup.php https://getcomposer.org/installer
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
rm composer-setup.php
composer self-update
fi
if ! command -v wp &>/dev/null; then
echo -e "Install WP CLI"
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp
fi
apt-get update && apt-get install -y default-mysql-client
docker-php-ext-install pdo pdo_mysql # for DxO (dxo-wp)
docker-entrypoint.sh apache2-foreground