mirror of
https://github.com/10h30/ols-docker-env.git
synced 2026-05-12 15:21:24 +09:00
Merge branch 'master' of https://github.com/litespeedtech/ols-docker-env
This commit is contained in:
@@ -29,8 +29,8 @@ linechange(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_owner(){
|
get_owner(){
|
||||||
WWW_UID=$(stat -c "%u" ${DEFAULT_VH_ROOT}/${1})
|
WWW_UID=$(stat -c "%u" ${DEFAULT_VH_ROOT})
|
||||||
WWW_GID=$(stat -c "%g" ${DEFAULT_VH_ROOT}/${1})
|
WWW_GID=$(stat -c "%g" ${DEFAULT_VH_ROOT})
|
||||||
if [ ${WWW_UID} -eq 0 ] || [ ${WWW_GID} -eq 0 ]; then
|
if [ ${WWW_UID} -eq 0 ] || [ ${WWW_GID} -eq 0 ]; then
|
||||||
echo "Found ${WWW_UID}:${WWW_GID} has root, will auto fix to 1000"
|
echo "Found ${WWW_UID}:${WWW_GID} has root, will auto fix to 1000"
|
||||||
WWW_UID=1000
|
WWW_UID=1000
|
||||||
@@ -107,6 +107,7 @@ app_wordpress_dl(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
main(){
|
main(){
|
||||||
|
set_vh_docroot ${DOMAIN}
|
||||||
get_owner
|
get_owner
|
||||||
cd ${VH_DOC_ROOT}
|
cd ${VH_DOC_ROOT}
|
||||||
if [ "${APP_NAME}" = 'wordpress' ] || [ "${APP_NAME}" = 'wp' ]; then
|
if [ "${APP_NAME}" = 'wordpress' ] || [ "${APP_NAME}" = 'wp' ]; then
|
||||||
@@ -132,7 +133,6 @@ while [ ! -z "${1}" ]; do
|
|||||||
-d | -D | -domain) shift
|
-d | -D | -domain) shift
|
||||||
check_input "${1}"
|
check_input "${1}"
|
||||||
DOMAIN="${1}"
|
DOMAIN="${1}"
|
||||||
set_vh_docroot ${DOMAIN}
|
|
||||||
;;
|
;;
|
||||||
-vhname) shift
|
-vhname) shift
|
||||||
VHNAME="${1}"
|
VHNAME="${1}"
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
docker-compose exec litespeed su -s /bin/bash lsadm -c 'echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q /usr/local/lsws/admin/misc/htpasswd.php '${1}')" > /usr/local/lsws/admin/conf/htpasswd';
|
|
||||||
|
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
docker-compose exec litespeed su -s /bin/bash lsadm -c \
|
||||||
|
'echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q $/usr/local/lsws/admin/misc/htpasswd.php '${1}')" > /usr/local/lsws/admin/conf/htpasswd';
|
||||||
|
|
||||||
@@ -6,22 +6,19 @@ RUN apt-get update && apt-get install wget curl -y
|
|||||||
RUN wget https://openlitespeed.org/preuse/openlitespeed-1.6.4.tgz && \
|
RUN wget https://openlitespeed.org/preuse/openlitespeed-1.6.4.tgz && \
|
||||||
tar xzvf openlitespeed-1.6.4.tgz && cd openlitespeed && ./install.sh && rm -rf /openlitespeed
|
tar xzvf openlitespeed-1.6.4.tgz && cd openlitespeed && ./install.sh && rm -rf /openlitespeed
|
||||||
|
|
||||||
RUN apt-get install -y software-properties-common && \
|
|
||||||
add-apt-repository 'deb http://ftp.debian.org/debian jessie-backports main' && \
|
|
||||||
apt-get update && apt-get install -y python-certbot-apache -t jessie-backports
|
|
||||||
|
|
||||||
RUN apt-get install mysql-client lsphp73 lsphp73-common lsphp73-mysql lsphp73-opcache \
|
RUN apt-get install mysql-client lsphp73 lsphp73-common lsphp73-mysql lsphp73-opcache \
|
||||||
lsphp73-curl lsphp73-json lsphp73-imagick lsphp73-redis lsphp73-memcached -y
|
lsphp73-curl lsphp73-json lsphp73-imagick lsphp73-redis lsphp73-memcached -y
|
||||||
|
|
||||||
EXPOSE 7080
|
EXPOSE 7080
|
||||||
|
|
||||||
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
|
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
|
ln -s /usr/local/lsws/lsphp73/bin/php7.3 /usr/bin/php
|
||||||
|
|
||||||
|
|
||||||
RUN rm -rf /usr/local/lsws/conf
|
RUN rm -rf /usr/local/lsws/conf
|
||||||
ADD conf /usr/local/lsws/conf
|
ADD conf /usr/local/lsws/conf
|
||||||
RUN chown 999 /usr/local/lsws/conf -R
|
RUN chown 999:999 /usr/local/lsws/conf -R
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
@@ -227,8 +227,13 @@ listener HTTPS {
|
|||||||
|
|
||||||
vhTemplate centralConfigLog {
|
vhTemplate centralConfigLog {
|
||||||
templateFile conf/templates/ccl.conf
|
templateFile conf/templates/ccl.conf
|
||||||
listeners HTTP
|
listeners Default, HTTP, HTTPS
|
||||||
|
|
||||||
|
member localhost {
|
||||||
|
vhDomain *
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
vhTemplate EasyRailsWithSuEXEC {
|
vhTemplate EasyRailsWithSuEXEC {
|
||||||
templateFile conf/templates/rails.conf
|
templateFile conf/templates/rails.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user