mirror of
https://github.com/10h30/ols-docker-env.git
synced 2026-05-12 15:21:24 +09:00
workflow
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
TimeZone=America/New_York
|
TimeZone=America/New_York
|
||||||
OLS_VERSION=1.6.15
|
OLS_VERSION=1.6.20
|
||||||
PHP_VERSION=lsphp74
|
PHP_VERSION=lsphp74
|
||||||
MYSQL_DATABASE=wordpress
|
MYSQL_DATABASE=wordpress
|
||||||
MYSQL_ROOT_PASSWORD=password
|
MYSQL_ROOT_PASSWORD=password
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
name: docker-build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup
|
||||||
|
run: |
|
||||||
|
docker-compose -v
|
||||||
|
docker-compose up -d
|
||||||
|
docker image ls
|
||||||
|
sleep 10
|
||||||
|
- name: Verify
|
||||||
|
run: bash .travis/verify.sh
|
||||||
|
- name: Clean up
|
||||||
|
run: |
|
||||||
|
docker-compose stop
|
||||||
|
docker-compose rm -f
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2019 - 2020 Litespeedtech
|
Copyright (c) 2019 - 2022 Litespeedtech
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# OpenLiteSpeed WordPress Docker Container
|
# OpenLiteSpeed WordPress Docker Container
|
||||||
[](https://hub.docker.com/r/litespeedtech/openlitespeed)
|
[](https://github.com/litespeedtech/ols-docker-env/actions/)
|
||||||
[](https://hub.docker.com/r/litespeedtech/openlitespeed)
|
[](https://hub.docker.com/r/litespeedtech/openlitespeed)
|
||||||
[<img src="https://img.shields.io/badge/slack-LiteSpeed-blue.svg?logo=slack">](litespeedtech.com/slack)
|
[<img src="https://img.shields.io/badge/slack-LiteSpeed-blue.svg?logo=slack">](litespeedtech.com/slack)
|
||||||
[<img src="https://img.shields.io/twitter/follow/litespeedtech.svg?label=Follow&style=social">](https://twitter.com/litespeedtech)
|
[<img src="https://img.shields.io/twitter/follow/litespeedtech.svg?label=Follow&style=social">](https://twitter.com/litespeedtech)
|
||||||
@@ -33,7 +33,7 @@ The docker image installs the following packages on your system:
|
|||||||
| :-------------: | :-------------: |
|
| :-------------: | :-------------: |
|
||||||
|Linux|Ubuntu 18.04|
|
|Linux|Ubuntu 18.04|
|
||||||
|OpenLiteSpeed|[Latest version](https://openlitespeed.org/downloads/)|
|
|OpenLiteSpeed|[Latest version](https://openlitespeed.org/downloads/)|
|
||||||
|MariaDB|[Stable version: 10.3](https://hub.docker.com/_/mariadb)|
|
|MariaDB|[Stable version: 10.5](https://hub.docker.com/_/mariadb)|
|
||||||
|PHP|[Latest version](http://rpms.litespeedtech.com/debian/)|
|
|PHP|[Latest version](http://rpms.litespeedtech.com/debian/)|
|
||||||
|LiteSpeed Cache|[Latest from WordPress.org](https://wordpress.org/plugins/litespeed-cache/)|
|
|LiteSpeed Cache|[Latest from WordPress.org](https://wordpress.org/plugins/litespeed-cache/)|
|
||||||
|ACME|[Latest from ACME official](https://github.com/acmesh-official/get.acme.sh)|
|
|ACME|[Latest from ACME official](https://github.com/acmesh-official/get.acme.sh)|
|
||||||
|
|||||||
+3
-3
@@ -79,7 +79,7 @@ EOT
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_db_access(){
|
check_db_access(){
|
||||||
docker-compose exec mysql su -c "mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e 'status'" >/dev/null 2>&1
|
docker-compose exec -T mysql su -c "mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e 'status'" >/dev/null 2>&1
|
||||||
if [ ${?} != 0 ]; then
|
if [ ${?} != 0 ]; then
|
||||||
echo '[X] DB access failed, please check!'
|
echo '[X] DB access failed, please check!'
|
||||||
exit 1
|
exit 1
|
||||||
@@ -87,7 +87,7 @@ check_db_access(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_db_exist(){
|
check_db_exist(){
|
||||||
docker-compose exec mysql su -c "test -e /var/lib/mysql/${1}"
|
docker-compose exec -T mysql su -c "test -e /var/lib/mysql/${1}"
|
||||||
if [ ${?} = 0 ]; then
|
if [ ${?} = 0 ]; then
|
||||||
echo "Database ${1} already exist, skip DB creation!"
|
echo "Database ${1} already exist, skip DB creation!"
|
||||||
exit 0
|
exit 0
|
||||||
@@ -95,7 +95,7 @@ check_db_exist(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
db_setup(){
|
db_setup(){
|
||||||
docker-compose exec mysql su -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD} \
|
docker-compose exec -T mysql su -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD} \
|
||||||
-e "CREATE DATABASE '${SQL_DB}';" \
|
-e "CREATE DATABASE '${SQL_DB}';" \
|
||||||
-e "GRANT ALL PRIVILEGES ON '${SQL_DB}'.* TO '${SQL_USER}'@'${ANY}' IDENTIFIED BY '${SQL_PASS}';" \
|
-e "GRANT ALL PRIVILEGES ON '${SQL_DB}'.* TO '${SQL_USER}'@'${ANY}' IDENTIFIED BY '${SQL_PASS}';" \
|
||||||
-e "FLUSH PRIVILEGES;"'
|
-e "FLUSH PRIVILEGES;"'
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ EOT
|
|||||||
}
|
}
|
||||||
|
|
||||||
app_download(){
|
app_download(){
|
||||||
docker-compose exec ${CONT_NAME} su -c "appinstallctl.sh --app ${1} --domain ${2}"
|
docker-compose exec -T ${CONT_NAME} su -c "appinstallctl.sh --app ${1} --domain ${2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
lsws_restart(){
|
lsws_restart(){
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ check_input(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
lsws_restart(){
|
lsws_restart(){
|
||||||
docker-compose exec ${CONT_NAME} su -c '/usr/local/lsws/bin/lswsctrl restart >/dev/null'
|
docker-compose exec -T ${CONT_NAME} su -c '/usr/local/lsws/bin/lswsctrl restart >/dev/null'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_serial(){
|
apply_serial(){
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb:10.3.17
|
image: mariadb:10.5.9
|
||||||
command: --max_allowed_packet=256M
|
command: --max_allowed_packet=256M
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/db:/var/lib/mysql:delegated"
|
- "./data/db:/var/lib/mysql:delegated"
|
||||||
@@ -33,7 +33,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
TZ: ${TimeZone}
|
TZ: ${TimeZone}
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
#image: bitnami/phpmyadmin:latest
|
|
||||||
image: bitnami/phpmyadmin:5.0.2-debian-10-r72
|
image: bitnami/phpmyadmin:5.0.2-debian-10-r72
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
|
|||||||
Reference in New Issue
Block a user