add-readme-to-docker-compose #6
@ -5,6 +5,9 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
grafana-default:
|
grafana-default:
|
||||||
profiles: ["full", "grafana"]
|
profiles: ["full", "grafana"]
|
||||||
|
depends_on:
|
||||||
|
nginx:
|
||||||
|
condition: service_healthy
|
||||||
extends:
|
extends:
|
||||||
file: common-settings.yml
|
file: common-settings.yml
|
||||||
service: common-settings
|
service: common-settings
|
||||||
@ -23,6 +26,12 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
grafana-default:
|
grafana-default:
|
||||||
profiles: ["full", "nginx"]
|
profiles: ["full", "nginx"]
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "fping", "--count=1", "${GRAFANA_VIP}", "--period=500", "--quiet"]
|
||||||
|
interval: 3s
|
||||||
|
timeout: 1s
|
||||||
|
retries: 60
|
||||||
|
start_period: 2s
|
||||||
extends:
|
extends:
|
||||||
file: common-settings.yml
|
file: common-settings.yml
|
||||||
service: common-settings
|
service: common-settings
|
||||||
|
@ -6,6 +6,7 @@ CONTEXT=cncf
|
|||||||
# ---
|
# ---
|
||||||
# GRAFANA_VERSION=x.y.z
|
# GRAFANA_VERSION=x.y.z
|
||||||
# NGINX_VERSION=x.y.z
|
# NGINX_VERSION=x.y.z
|
||||||
|
# GRAFANA_VIP=10.1.1.2
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -5,6 +5,7 @@ CONTEXT=fsf
|
|||||||
# Set something sensible here and uncomment
|
# Set something sensible here and uncomment
|
||||||
# ---
|
# ---
|
||||||
# VAULT_VERSION=x.y.z
|
# VAULT_VERSION=x.y.z
|
||||||
|
# VAULT_VIP=10.1.1.2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
services:
|
services:
|
||||||
{%- if ',' in cookiecutter.__component_list_slug -%}
|
{%- if ',' in cookiecutter.__component_list_slug -%}
|
||||||
{%- set components = cookiecutter.__component_list_slug.split(',') -%}
|
{%- set components = cookiecutter.__component_list_slug.split(',') -%}
|
||||||
|
{%- set ns = namespace(found=false) -%}
|
||||||
|
{%- for component in components %}
|
||||||
|
{%- if loop.first -%}
|
||||||
|
{%- set ns.first_component = component -%}
|
||||||
|
{%- elif N is undefined -%}
|
||||||
|
{%- set ns.second_component = component -%}
|
||||||
|
{%- set N = 0 -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
{%- for component in components %}
|
{%- for component in components %}
|
||||||
{{ component }}:
|
{{ component }}:
|
||||||
image: "{{ component }}:${% raw %}{{% endraw %}{{ component.upper() }}_VERSION{% raw %}}{% endraw %}"
|
image: "{{ component }}:${% raw %}{{% endraw %}{{ component.upper() }}_VERSION{% raw %}}{% endraw %}"
|
||||||
@ -8,6 +17,18 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
{{ cookiecutter.__service_slug }}-default:
|
{{ cookiecutter.__service_slug }}-default:
|
||||||
profiles: ["full", "{{ component }}"]
|
profiles: ["full", "{{ component }}"]
|
||||||
|
{% if loop.first -%}
|
||||||
|
depends_on:
|
||||||
|
{{ ns.second_component }}:
|
||||||
|
condition: service_healthy
|
||||||
|
{%- else -%}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "fping", "--count=1", "${% raw %}{{% endraw %}{{ ns.first_component.upper() }}_VIP{% raw %}}{% endraw %}", "--period=500", "--quiet"]
|
||||||
|
interval: 3s
|
||||||
|
timeout: 1s
|
||||||
|
retries: 60
|
||||||
|
start_period: 2s
|
||||||
|
{%- endif %}
|
||||||
extends:
|
extends:
|
||||||
file: common-settings.yml
|
file: common-settings.yml
|
||||||
service: common-settings
|
service: common-settings
|
||||||
|
@ -8,6 +8,11 @@ CONTEXT={{ cookiecutter.__context_slug }}
|
|||||||
{% for component in components %}
|
{% for component in components %}
|
||||||
# {{ component.upper() }}_VERSION=x.y.z
|
# {{ component.upper() }}_VERSION=x.y.z
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{%- for component in components %}
|
||||||
|
{%- if loop.first %}
|
||||||
|
# {{ component.upper() }}_VIP=10.1.1.2
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user