22 lines
797 B
Django/Jinja
22 lines
797 B
Django/Jinja
services:
|
|
httpbin:
|
|
image: {{ httpbin_image }}
|
|
container_name: {{ httpbin_service_name }}
|
|
restart: unless-stopped
|
|
networks:
|
|
- {{ httpbin_traefik_network }}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.docker.network={{ httpbin_traefik_network }}
|
|
- traefik.http.routers.{{ httpbin_service_name }}.rule=Host(`{{ httpbin_domain }}`)
|
|
{% if httpbin_use_ssl %}
|
|
- traefik.http.routers.{{ httpbin_service_name }}.entrypoints=websecure
|
|
- traefik.http.routers.{{ httpbin_service_name }}.tls=true
|
|
{% else %}
|
|
- traefik.http.routers.{{ httpbin_service_name }}.entrypoints=web
|
|
{% endif %}
|
|
- traefik.http.services.{{ httpbin_service_name }}.loadbalancer.server.port={{ httpbin_port }}
|
|
|
|
networks:
|
|
{{ httpbin_traefik_network }}:
|
|
external: true
|