mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-09-12 09:35:55 +08:00
Merge pull request #1060 from nextcloud/healthcheck-apache-fix
fix apache healthcheck
This commit is contained in:
commit
14fdec4dd4
2 changed files with 11 additions and 1 deletions
|
@ -61,8 +61,10 @@ RUN mkdir /var/log/supervisord; \
|
||||||
COPY Caddyfile /
|
COPY Caddyfile /
|
||||||
|
|
||||||
COPY start.sh /usr/bin/
|
COPY start.sh /usr/bin/
|
||||||
|
COPY healthcheck.sh /usr/bin/
|
||||||
COPY supervisord.conf /
|
COPY supervisord.conf /
|
||||||
RUN chmod +x /usr/bin/start.sh; \
|
RUN chmod +x /usr/bin/start.sh; \
|
||||||
|
chmod +x /usr/bin/healthcheck.sh; \
|
||||||
chmod +r /supervisord.conf; \
|
chmod +r /supervisord.conf; \
|
||||||
chown www-data:www-data /Caddyfile; \
|
chown www-data:www-data /Caddyfile; \
|
||||||
chmod +r -R /etc/apache2
|
chmod +r -R /etc/apache2
|
||||||
|
@ -75,4 +77,4 @@ USER www-data
|
||||||
ENTRYPOINT ["start.sh"]
|
ENTRYPOINT ["start.sh"]
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||||
|
|
||||||
HEALTHCHECK CMD (curl -skfI localhost:8000 && curl -skfI localhost:$APACHE_PORT) || exit 1
|
HEALTHCHECK CMD healthcheck.sh
|
8
Containers/apache/healthcheck.sh
Normal file
8
Containers/apache/healthcheck.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
curl -skfI localhost:8000 || exit 1
|
||||||
|
if [ "$APACHE_PORT" != '443' ]; then
|
||||||
|
curl -skfI localhost:"$APACHE_PORT" || exit 1
|
||||||
|
else
|
||||||
|
curl -skfI https://"$NC_DOMAIN":"$APACHE_PORT" || exit 1
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue