repo: Move ansible setup to root dir
This commit is contained in:
parent
ff718b46ef
commit
7a37d60494
48 changed files with 127 additions and 172 deletions
11
roles/caddy/tasks/main.yaml
Normal file
11
roles/caddy/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
- name: Ensure caddy network exists
|
||||
community.docker.docker_network:
|
||||
name: caddy
|
||||
|
||||
- name: Start the compose stack
|
||||
community.docker.docker_compose_v2:
|
||||
project_name: caddy
|
||||
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
|
||||
remove_orphans: true
|
||||
wait: true
|
||||
wait_timeout: 60
|
||||
30
roles/caddy/templates/docker-compose.yaml.j2
Normal file
30
roles/caddy/templates/docker-compose.yaml.j2
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
services:
|
||||
caddy:
|
||||
image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
networks:
|
||||
- caddy
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- caddy_data:/caddy
|
||||
labels:
|
||||
caddy.auto_https: "off"
|
||||
|
||||
whoami:
|
||||
container_name: whoami
|
||||
image: traefik/whoami
|
||||
networks:
|
||||
- caddy
|
||||
labels:
|
||||
caddy: "http://test.pichi.berlin"
|
||||
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}" # has to be done to prevent ansible templating
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
caddy_data: {}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue