2022-04-15 08:51:19 +00:00
|
|
|
version: "{{ DOCKER_COMPOSE_VERSION }}"
|
2019-12-24 16:22:12 +00:00
|
|
|
services:
|
2021-10-14 10:47:23 +00:00
|
|
|
# Web proxy for load balancing and SSL termination
|
2020-09-17 10:53:14 +00:00
|
|
|
caddy:
|
|
|
|
image: {{ DOCKER_IMAGE_CADDY }}
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
2021-10-14 10:47:23 +00:00
|
|
|
- "{{ CADDY_HTTP_PORT }}:80"
|
2023-06-23 15:04:58 +00:00
|
|
|
{% if ENABLE_HTTPS and ENABLE_WEB_PROXY %}
|
|
|
|
- "443:443"
|
|
|
|
# include support for http/3
|
|
|
|
- "443:443/udp"
|
|
|
|
{% endif %}
|
2021-11-09 10:30:00 +00:00
|
|
|
environment:
|
|
|
|
default_site_port: "{% if not ENABLE_HTTPS or not ENABLE_WEB_PROXY %}:80{% endif %}"
|
2020-09-17 10:53:14 +00:00
|
|
|
volumes:
|
|
|
|
- ../apps/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
2021-10-14 10:47:23 +00:00
|
|
|
{% if ENABLE_HTTPS and ENABLE_WEB_PROXY %}- ../../data/caddy:/data{% endif %}
|
|
|
|
{% if not ENABLE_HTTPS %}
|
2019-12-24 16:22:12 +00:00
|
|
|
networks:
|
|
|
|
default:
|
2021-10-14 10:47:23 +00:00
|
|
|
# These aliases are for internal communication between containers when running locally
|
2023-12-05 10:35:48 +00:00
|
|
|
# with *.local.edly.io hostnames.
|
2019-12-24 16:22:12 +00:00
|
|
|
aliases:
|
|
|
|
- "{{ LMS_HOST }}"
|
2021-10-14 10:47:23 +00:00
|
|
|
{{ patch("local-docker-compose-caddy-aliases")|indent(10) }}
|
2019-12-24 16:22:12 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2021-10-14 10:47:23 +00:00
|
|
|
{{ patch("local-docker-compose-prod-services")|indent(2) }}
|