Created bind volume for caddy which takes the json fragments which will later be injected through the caddy api to dynamically set their individual reverse proxy addresses. This is not entirely necessary if the injection should be done as a variable instead, but makes it easier to change routes and especially more complicated ones (I'm thinking of gitea with ssh access e.g.).
23 lines
432 B
Django/Jinja
23 lines
432 B
Django/Jinja
version: "3.7"
|
|
|
|
services:
|
|
app:
|
|
image: caddy:{{ caddy_version }}
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- "{{ caddy_caddyfile_dir }}:/etc/caddy"
|
|
- "{{ docker_stack_files_dir }}:/stacks:ro"
|
|
- data:/data
|
|
- config:/config
|
|
networks:
|
|
- "{{ docker_swarm_public_network_name }}"
|
|
|
|
volumes:
|
|
data:
|
|
config:
|
|
|
|
networks:
|
|
"{{ docker_swarm_public_network_name }}":
|
|
external: true
|