diff --git a/.env b/.env index b69fabe..2b27784 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ -LITESPEED=1.5.10wp +LITESPEED=1.5.10 -WEB_ADMIN_PASSWORD=123456 +WEB_ADMIN_PASSWORD=litespeed MYSQL_DATABASE=wordpress MYSQL_ROOT_PASSWORD=password diff --git a/.travis.yml b/.travis.yml index dcbb26b..f9c7a8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: bash + sudo: 'required' notifications: @@ -22,7 +23,13 @@ install: - docker-compose up -d before_script: - - curl http://localhost:80/ + - docker image ls + - docker ps + - curl -Ik http://localhost:80/ + +after_script: + - docker-compose stop + - docker-compose rm -f #after_success: # - if [[ "$TRAVIS_BRANCH" == "master" ]]; then diff --git a/config/litespeed/1.5.10wp/.DS_Store b/config/litespeed/1.5.10/.DS_Store similarity index 100% rename from config/litespeed/1.5.10wp/.DS_Store rename to config/litespeed/1.5.10/.DS_Store diff --git a/config/litespeed/1.5.10wp/Dockerfile b/config/litespeed/1.5.10/Dockerfile similarity index 99% rename from config/litespeed/1.5.10wp/Dockerfile rename to config/litespeed/1.5.10/Dockerfile index 08b09fc..dbcccd8 100644 --- a/config/litespeed/1.5.10wp/Dockerfile +++ b/config/litespeed/1.5.10/Dockerfile @@ -38,6 +38,5 @@ COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] WORKDIR /var/www/html/ - CMD ["/usr/local/lsws/bin/openlitespeed","-n"] diff --git a/config/litespeed/1.5.10wp/conf/.DS_Store b/config/litespeed/1.5.10/conf/.DS_Store similarity index 100% rename from config/litespeed/1.5.10wp/conf/.DS_Store rename to config/litespeed/1.5.10/conf/.DS_Store diff --git a/config/litespeed/1.5.10wp/conf/httpd_config.conf b/config/litespeed/1.5.10/conf/httpd_config.conf similarity index 100% rename from config/litespeed/1.5.10wp/conf/httpd_config.conf rename to config/litespeed/1.5.10/conf/httpd_config.conf diff --git a/config/litespeed/1.5.10wp/conf/httpd_config.conf.bak b/config/litespeed/1.5.10/conf/httpd_config.conf.bak similarity index 100% rename from config/litespeed/1.5.10wp/conf/httpd_config.conf.bak rename to config/litespeed/1.5.10/conf/httpd_config.conf.bak diff --git a/config/litespeed/1.5.10wp/conf/mime.properties b/config/litespeed/1.5.10/conf/mime.properties similarity index 100% rename from config/litespeed/1.5.10wp/conf/mime.properties rename to config/litespeed/1.5.10/conf/mime.properties diff --git a/config/litespeed/1.5.10wp/conf/templates/ccl.conf b/config/litespeed/1.5.10/conf/templates/ccl.conf similarity index 100% rename from config/litespeed/1.5.10wp/conf/templates/ccl.conf rename to config/litespeed/1.5.10/conf/templates/ccl.conf diff --git a/config/litespeed/1.5.10wp/conf/templates/phpsuexec.conf b/config/litespeed/1.5.10/conf/templates/phpsuexec.conf similarity index 100% rename from config/litespeed/1.5.10wp/conf/templates/phpsuexec.conf rename to config/litespeed/1.5.10/conf/templates/phpsuexec.conf diff --git a/config/litespeed/1.5.10wp/conf/templates/rails.conf b/config/litespeed/1.5.10/conf/templates/rails.conf similarity index 100% rename from config/litespeed/1.5.10wp/conf/templates/rails.conf rename to config/litespeed/1.5.10/conf/templates/rails.conf diff --git a/config/litespeed/1.5.10wp/conf/vhosts/.DS_Store b/config/litespeed/1.5.10/conf/vhosts/.DS_Store similarity index 100% rename from config/litespeed/1.5.10wp/conf/vhosts/.DS_Store rename to config/litespeed/1.5.10/conf/vhosts/.DS_Store diff --git a/config/litespeed/1.5.10wp/conf/vhosts/Example/htgroup b/config/litespeed/1.5.10/conf/vhosts/Example/htgroup similarity index 100% rename from config/litespeed/1.5.10wp/conf/vhosts/Example/htgroup rename to config/litespeed/1.5.10/conf/vhosts/Example/htgroup diff --git a/config/litespeed/1.5.10wp/conf/vhosts/Example/htpasswd b/config/litespeed/1.5.10/conf/vhosts/Example/htpasswd similarity index 100% rename from config/litespeed/1.5.10wp/conf/vhosts/Example/htpasswd rename to config/litespeed/1.5.10/conf/vhosts/Example/htpasswd diff --git a/config/litespeed/1.5.10wp/conf/vhosts/Example/vhconf.conf b/config/litespeed/1.5.10/conf/vhosts/Example/vhconf.conf similarity index 100% rename from config/litespeed/1.5.10wp/conf/vhosts/Example/vhconf.conf rename to config/litespeed/1.5.10/conf/vhosts/Example/vhconf.conf diff --git a/config/litespeed/1.5.10wp/conf/vhosts/Example/vhconf.conf.bak b/config/litespeed/1.5.10/conf/vhosts/Example/vhconf.conf.bak similarity index 100% rename from config/litespeed/1.5.10wp/conf/vhosts/Example/vhconf.conf.bak rename to config/litespeed/1.5.10/conf/vhosts/Example/vhconf.conf.bak diff --git a/config/litespeed/1.5.10wp/entrypoint.sh b/config/litespeed/1.5.10/entrypoint.sh similarity index 93% rename from config/litespeed/1.5.10wp/entrypoint.sh rename to config/litespeed/1.5.10/entrypoint.sh index d2c5f71..356e563 100644 --- a/config/litespeed/1.5.10wp/entrypoint.sh +++ b/config/litespeed/1.5.10/entrypoint.sh @@ -1,15 +1,17 @@ #!/bin/bash -cd localhost/html +cd /var/www/html if [ ! -f "./wp-config.php" ]; then # su -s /bin/bash www-data -c COUNTER=0 until [ "$(curl -v mysql:3306 2>&1 | grep native)" ]; do + echo "Counter: ${COUNTER}" COUNTER=$((COUNTER+1)) if [ ${COUNTER} = 10 ]; then echo '--- MySQL is starting, please wait... ---' elif [ ${COUNTER} = 100 ]; then echo '--- MySQL is timeout, exit! ---' + exit 1 fi sleep 1 done @@ -33,7 +35,7 @@ if [ ! -f "./wp-config.php" ]; then --skip-email \ --allow-root wp plugin install litespeed-cache \ - --activate + --activate \ --allow-root fi diff --git a/docker-compose.yml b/docker-compose.yml index ccdd4b3..790a2c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,12 +18,14 @@ services: - .env volumes: - ./sites:/var/www/html/ + - ./sites:/usr/local/lsws/Example/logs/access.log + - ./sites/logs:/usr/local/lsws/logs/ ports: - 80:80 - 443:443 - 7080:7080 environment: - - WEB_ADMIN_PASSWORD=${WEB_ADMIN_PASSWORD} + WEB_ADMIN_PASSWORD: ${WEB_ADMIN_PASSWORD} restart: always adminer: image: dockette/adminer:full diff --git a/sites/localhost/.DS_Store b/sites/localhost/.DS_Store deleted file mode 100644 index b289501..0000000 Binary files a/sites/localhost/.DS_Store and /dev/null differ diff --git a/sites/localhost/logs/.DS_Store b/sites/logs/.DS_Store similarity index 100% rename from sites/localhost/logs/.DS_Store rename to sites/logs/.DS_Store diff --git a/sites/localhost/logs/access.log b/sites/logs/access.log similarity index 100% rename from sites/localhost/logs/access.log rename to sites/logs/access.log diff --git a/sites/logs/error.log b/sites/logs/error.log new file mode 100644 index 0000000..e69de29 diff --git a/sites/logs/lsrestart.log b/sites/logs/lsrestart.log new file mode 100644 index 0000000..e69de29 diff --git a/sites/logs/stderr.log b/sites/logs/stderr.log new file mode 100644 index 0000000..e69de29