master
Cold-Egg 5 years ago
parent 3442bc5cba
commit 6a7461e3fd

@ -1,6 +1,6 @@
LITESPEED=1.5.10wp LITESPEED=1.5.10
WEB_ADMIN_PASSWORD=123456 WEB_ADMIN_PASSWORD=litespeed
MYSQL_DATABASE=wordpress MYSQL_DATABASE=wordpress
MYSQL_ROOT_PASSWORD=password MYSQL_ROOT_PASSWORD=password

@ -1,4 +1,5 @@
language: bash language: bash
sudo: 'required' sudo: 'required'
notifications: notifications:
@ -22,7 +23,13 @@ install:
- docker-compose up -d - docker-compose up -d
before_script: 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: #after_success:
# - if [[ "$TRAVIS_BRANCH" == "master" ]]; then # - if [[ "$TRAVIS_BRANCH" == "master" ]]; then

@ -38,6 +38,5 @@ COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /var/www/html/ WORKDIR /var/www/html/
CMD ["/usr/local/lsws/bin/openlitespeed","-n"] CMD ["/usr/local/lsws/bin/openlitespeed","-n"]

@ -1,15 +1,17 @@
#!/bin/bash #!/bin/bash
cd localhost/html cd /var/www/html
if [ ! -f "./wp-config.php" ]; then if [ ! -f "./wp-config.php" ]; then
# su -s /bin/bash www-data -c # su -s /bin/bash www-data -c
COUNTER=0 COUNTER=0
until [ "$(curl -v mysql:3306 2>&1 | grep native)" ]; until [ "$(curl -v mysql:3306 2>&1 | grep native)" ];
do do
echo "Counter: ${COUNTER}"
COUNTER=$((COUNTER+1)) COUNTER=$((COUNTER+1))
if [ ${COUNTER} = 10 ]; then if [ ${COUNTER} = 10 ]; then
echo '--- MySQL is starting, please wait... ---' echo '--- MySQL is starting, please wait... ---'
elif [ ${COUNTER} = 100 ]; then elif [ ${COUNTER} = 100 ]; then
echo '--- MySQL is timeout, exit! ---' echo '--- MySQL is timeout, exit! ---'
exit 1
fi fi
sleep 1 sleep 1
done done
@ -33,7 +35,7 @@ if [ ! -f "./wp-config.php" ]; then
--skip-email \ --skip-email \
--allow-root --allow-root
wp plugin install litespeed-cache \ wp plugin install litespeed-cache \
--activate --activate \
--allow-root --allow-root
fi fi

@ -18,12 +18,14 @@ services:
- .env - .env
volumes: volumes:
- ./sites:/var/www/html/ - ./sites:/var/www/html/
- ./sites:/usr/local/lsws/Example/logs/access.log
- ./sites/logs:/usr/local/lsws/logs/
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
- 7080:7080 - 7080:7080
environment: environment:
- WEB_ADMIN_PASSWORD=${WEB_ADMIN_PASSWORD} WEB_ADMIN_PASSWORD: ${WEB_ADMIN_PASSWORD}
restart: always restart: always
adminer: adminer:
image: dockette/adminer:full image: dockette/adminer:full

Binary file not shown.
Loading…
Cancel
Save