mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-17 17:26:42 +02:00
Added health check and restart policy to openresty
This commit is contained in:
parent
3587531bda
commit
6c966bce2e
@ -1,5 +1,6 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
openresty:
|
openresty:
|
||||||
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
container_name: {{ OPENRESTY_CONTAINER }}
|
container_name: {{ OPENRESTY_CONTAINER }}
|
||||||
image: {{ OPENRESTY_IMAGE }}:{{ OPENRESTY_VERSION }}
|
image: {{ OPENRESTY_IMAGE }}:{{ OPENRESTY_VERSION }}
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
@ -13,3 +14,8 @@
|
|||||||
- {{ LETSENCRYPT_WEBROOT_PATH }}:{{ LETSENCRYPT_WEBROOT_PATH }}:ro
|
- {{ LETSENCRYPT_WEBROOT_PATH }}:{{ LETSENCRYPT_WEBROOT_PATH }}:ro
|
||||||
- {{ LETSENCRYPT_BASE_PATH }}:{{ LETSENCRYPT_BASE_PATH }}:ro
|
- {{ LETSENCRYPT_BASE_PATH }}:{{ LETSENCRYPT_BASE_PATH }}:ro
|
||||||
command: ["openresty", "-g", "daemon off;"]
|
command: ["openresty", "-g", "daemon off;"]
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "openresty", "-t", "-q"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
1
roles/svc-prx-openresty/templates/env.j2
Normal file
1
roles/svc-prx-openresty/templates/env.j2
Normal file
@ -0,0 +1 @@
|
|||||||
|
{# Dummy file to use base template #}
|
Loading…
x
Reference in New Issue
Block a user