30 lines
1017 B
YAML
30 lines
1017 B
YAML
version: "{{ DOCKER_COMPOSE_VERSION }}"
|
|
services:
|
|
# Web proxy for load balancing and SSL termination
|
|
caddy:
|
|
image: {{ DOCKER_IMAGE_CADDY }}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "{{ CADDY_HTTP_PORT }}:80"
|
|
{% if ENABLE_HTTPS and ENABLE_WEB_PROXY %}
|
|
- "443:443"
|
|
# include support for http/3
|
|
- "443:443/udp"
|
|
{% endif %}
|
|
environment:
|
|
default_site_port: "{% if not ENABLE_HTTPS or not ENABLE_WEB_PROXY %}:80{% endif %}"
|
|
volumes:
|
|
- ../apps/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
{% if ENABLE_HTTPS and ENABLE_WEB_PROXY %}- ../../data/caddy:/data{% endif %}
|
|
{% if not ENABLE_HTTPS %}
|
|
networks:
|
|
default:
|
|
# These aliases are for internal communication between containers when running locally
|
|
# with *.local.edly.io hostnames.
|
|
aliases:
|
|
- "{{ LMS_HOST }}"
|
|
{{ patch("local-docker-compose-caddy-aliases")|indent(10) }}
|
|
{% endif %}
|
|
|
|
{{ patch("local-docker-compose-prod-services")|indent(2) }}
|