mirror of
https://github.com/10h30/ols-docker-env.git
synced 2026-05-12 15:21:24 +09:00
fixed addDomain.sh, auto correct folder permissions, included localhost
This commit is contained in:
@@ -14,7 +14,7 @@ RUN apt-get install mysql-client lsphp73 lsphp73-mysql lsphp73-opcache lsphp73-c
|
||||
EXPOSE 7080
|
||||
|
||||
RUN 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 && \
|
||||
chmod +x wp-cli.phar && mv wp-cli.phar /usr/bin/wp && \
|
||||
ln -s /usr/local/lsws/lsphp73/bin/php7.3 /usr/bin/php
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
chown 999:999 /usr/local/lsws/conf -R
|
||||
cd /var/www/vhosts/localhost/html
|
||||
if [ ! -f "./wp-config.php" ]; then
|
||||
# su -s /bin/bash www-data -c
|
||||
@@ -36,15 +37,19 @@ if [ ! -f "./wp-config.php" ]; then
|
||||
--allow-root
|
||||
wp plugin install litespeed-cache \
|
||||
--activate \
|
||||
--allow-root
|
||||
--allow-root
|
||||
first_www_uid=$(stat -c "%u" /var/www/vhosts/localhost)
|
||||
first_www_gid=$(stat -c "%g" /var/www/vhosts/localhost)
|
||||
chown $first_www_uid:$first_www_gid /var/www/vhosts/localhost -R
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#www_uid=$(stat -c "%u" /var/www/vhosts/localhost)
|
||||
#if [ ${www_uid} -eq 0 ]; then
|
||||
# #echo "./sites/localhost is owned by root, auto changing ownership of ./sites/localhost to uid 1000"
|
||||
# chown 1000 /var/www/vhosts/localhost -R
|
||||
#fi
|
||||
www_uid=$(stat -c "%u" /var/www/vhosts/localhost)
|
||||
if [ ${www_uid} -eq 0 ]; then
|
||||
#echo "./sites/localhost is owned by root, auto changing ownership of ./sites/localhost to uid 1000"
|
||||
chown 1000:1000 /var/www/vhosts/localhost -R
|
||||
fi
|
||||
|
||||
echo "WordPress installation finished."
|
||||
exec "$@"
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user