set env/doc root

This commit is contained in:
Cold-Egg
2019-12-18 16:24:03 -05:00
parent ada70066dd
commit 8671e23eac
6 changed files with 36 additions and 11 deletions
+3 -1
View File
@@ -9,9 +9,11 @@ RUN apt-get update && apt-get install -y wget && \
apt-get install -y curl mysql-client \
lsphp73 lsphp73-mysql lsphp73-opcache lsphp73-curl
RUN echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q /usr/local/lsws/admin/misc/htpasswd.php ${WEB_ADMIN})" \
> /usr/local/lsws/admin/conf/htpasswd
EXPOSE 7080
# get wp-cli
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 && \
ln -s /usr/local/lsws/lsphp73/bin/php7.3 /usr/bin/php
@@ -31,6 +31,7 @@ expires {
enableExpires 1
expiresByType image/*=A604800,text/css=A604800,application/x-javascript=A604800,application/javascript=A604800,font/*=A604800,application/x-font-ttf=A604800
}
autoLoadHtaccess 1
tuning {
eventDispatcher best
@@ -1,4 +1,4 @@
docRoot $VH_ROOT/html/
docRoot /var/www/vhosts/
enableGzip 1
errorlog $VH_ROOT/logs/error.log {
+5 -5
View File
@@ -21,11 +21,11 @@ if [ ! -f "./wp-config.php" ]; then
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 /var/www/vhosts/localhost -R
#fi
echo "WordPress installation finished."
exec "$@"