mirror of
https://github.com/10h30/ols-docker-env.git
synced 2026-05-12 15:21:24 +09:00
Changed launch command, and loop that checks if ols is running
This commit is contained in:
@@ -28,5 +28,4 @@ COPY entrypoint.sh /entrypoint.sh
|
|||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
WORKDIR /var/www/vhosts/
|
WORKDIR /var/www/vhosts/
|
||||||
CMD ["/usr/local/lsws/bin/openlitespeed","-n"]
|
CMD ["/usr/local/lsws/bin/lswsctrl","start"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
chown 999:999 /usr/local/lsws/conf -R
|
chown 999:999 /usr/local/lsws/conf -R
|
||||||
chown 999:1000 /usr/local/lsws/admin/conf -R
|
chown 999:1000 /usr/local/lsws/admin/conf -R
|
||||||
exec "$@"
|
|
||||||
|
#start ols and ping it every 60 second to make sure it running, if not exist container (assuming ols crashed)
|
||||||
|
$@
|
||||||
|
while true; do
|
||||||
|
if ! /usr/local/lsws/bin/lswsctrl status | grep 'litespeed is running with PID *' > /dev/null; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 60
|
||||||
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -235,6 +235,9 @@ listener HTTPS {
|
|||||||
vhTemplate centralConfigLog {
|
vhTemplate centralConfigLog {
|
||||||
templateFile conf/templates/ccl.conf
|
templateFile conf/templates/ccl.conf
|
||||||
listeners Default, HTTP, HTTPS
|
listeners Default, HTTP, HTTPS
|
||||||
|
member example3.com {
|
||||||
|
vhDomain example3.com,www.example3.com
|
||||||
|
}
|
||||||
|
|
||||||
member localhost {
|
member localhost {
|
||||||
vhDomain localhost, *
|
vhDomain localhost, *
|
||||||
|
|||||||
@@ -235,11 +235,12 @@ listener HTTPS {
|
|||||||
vhTemplate centralConfigLog {
|
vhTemplate centralConfigLog {
|
||||||
templateFile conf/templates/ccl.conf
|
templateFile conf/templates/ccl.conf
|
||||||
listeners Default, HTTP, HTTPS
|
listeners Default, HTTP, HTTPS
|
||||||
member larshagen.net {
|
member example3.com {
|
||||||
vhDomain larshagen.net
|
vhDomain example3.com,www.example3.com
|
||||||
}
|
}
|
||||||
|
|
||||||
member localhost {
|
member localhost {
|
||||||
vhDomain localhost
|
vhDomain localhost, *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user