Add basic caddy swarm role
Added caddy as swarm container. Uses templated Caddyfile which can be set up for testing purposes for now. Depends on docker and docker-swarm, and will keep its stuff where docker-swarm sets itself up.
This commit is contained in:
parent
453cd2fd2b
commit
9f188c2674
7 changed files with 102 additions and 0 deletions
22
roles/caddy/templates/docker-stack.yml.j2
Normal file
22
roles/caddy/templates/docker-stack.yml.j2
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: caddy:{{ caddy_version }}
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "{{ caddy_caddyfile_dir }}:/etc/caddy"
|
||||
- data:/data
|
||||
- config:/config
|
||||
networks:
|
||||
- "{{ docker_swarm_public_network_name }}"
|
||||
|
||||
volumes:
|
||||
data:
|
||||
config:
|
||||
|
||||
networks:
|
||||
"{{ docker_swarm_public_network_name }}":
|
||||
external: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue