diff --git a/README.md b/README.md index 6439b7b..c1607b8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # OpenLiteSpeed WordPress Docker Container (Beta) [![Build Status](https://travis-ci.com/litespeedtech/ols-docker-env.svg?branch=master)](https://hub.docker.com/r/litespeedtech/openlitespeed) [![OpenLiteSpeed](https://img.shields.io/badge/openlitespeed-1.6.5-informational?style=flat&color=blue)](https://hub.docker.com/r/litespeedtech/openlitespeed) -[![docker pulls](https://img.shields.io/docker/pulls/litespeedtech/openlitespeed-beta?style=flat&color=blue)](https://hub.docker.com/r/litespeedtech/openlitespeed-beta) +[![docker pulls](https://img.shields.io/docker/pulls/litespeedtech/openlitespeed?style=flat&color=blue)](https://hub.docker.com/r/litespeedtech/openlitespeed) +[![beta pulls](https://img.shields.io/docker/pulls/litespeedtech/openlitespeed-beta?label=beta%20pulls)](https://hub.docker.com/r/litespeedtech/openlitespeed-beta) Install a Lightweight WordPress container with OpenLiteSpeed 1.6.5+ & PHP 7.3+ based on Ubuntu 18.04 Linux. @@ -109,6 +110,11 @@ Use the root domain in this command, and it will check for a certificate and aut ``` ./bin/cert.sh example.com ``` +### Update Web Server +To upgrade web server to latest stable version, run +``` +bash bin/webadmin.sh -lsup +``` ### Accessing the Database After installation, you can use Adminer (formerly phpMinAdmin) to access the database by visiting http://127.0.0.1:8080. The default username is `root`, and the password is the same as the one you supplied in the `.env` file. diff --git a/bin/webadmin.sh b/bin/webadmin.sh index 219e2b0..45bad27 100755 --- a/bin/webadmin.sh +++ b/bin/webadmin.sh @@ -9,6 +9,9 @@ help_message(){ echo 'Will restart LiteSpeed Web Server' echo 'Command [-modsec] [enable|disable]' echo 'Example: webadmin -modsec enable' + echo 'Command [-lsup]' + echo 'Example: webadmin.sh -lsup' + echo 'Will upgrade to latest stable version' exit 0 } @@ -35,6 +38,10 @@ mod_secure(){ fi } +ls_upgrade(){ + docker-compose exec ${CONT_NAME} su -c '/usr/local/lsws/admin/misc/lsup.sh 2>/dev/null' +} + set_web_admin(){ docker-compose exec ${CONT_NAME} 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'; @@ -56,6 +63,9 @@ while [ ! -z "${1}" ]; do -modsec | -sec| --sec) shift mod_secure ${1} ;; + -lsup | -upgrade) shift + ls_upgrade + ;; *) main ${1} ;; diff --git a/config/litespeed/1.6.4.lh/Dockerfile b/config/litespeed/1.6.4.lh/Dockerfile index d4cfbee..6e0e084 100644 --- a/config/litespeed/1.6.4.lh/Dockerfile +++ b/config/litespeed/1.6.4.lh/Dockerfile @@ -9,6 +9,10 @@ RUN wget https://openlitespeed.org/preuse/openlitespeed-1.6.4.tgz && \ RUN apt-get install mysql-client lsphp73 lsphp73-common lsphp73-mysql lsphp73-opcache \ lsphp73-curl lsphp73-json lsphp73-imagick lsphp73-redis lsphp73-memcached -y +RUN wget -O /usr/local/lsws/admin/misc/lsup.sh \ + https://raw.githubusercontent.com/litespeedtech/openlitespeed/master/dist/admin/misc/lsup.sh && \ + chmod +x /usr/local/lsws/admin/misc/lsup.sh + EXPOSE 7080 RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \ diff --git a/config/litespeed/1.6.5.lh/Dockerfile b/config/litespeed/1.6.5.lh/Dockerfile index 3312725..be066f9 100644 --- a/config/litespeed/1.6.5.lh/Dockerfile +++ b/config/litespeed/1.6.5.lh/Dockerfile @@ -9,6 +9,10 @@ RUN wget https://openlitespeed.org/preuse/openlitespeed-1.6.5.tgz && \ RUN apt-get install mysql-client lsphp73 lsphp73-common lsphp73-mysql lsphp73-opcache \ lsphp73-curl lsphp73-json lsphp73-imagick lsphp73-redis lsphp73-memcached -y +RUN wget -O /usr/local/lsws/admin/misc/lsup.sh \ + https://raw.githubusercontent.com/litespeedtech/openlitespeed/master/dist/admin/misc/lsup.sh && \ + chmod +x /usr/local/lsws/admin/misc/lsup.sh + EXPOSE 7080 RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \