Acts as reverse proxy for the docker instance. Can be configured through docker labels. Proxies anything that is received on port 80 or 443.
19 lines
525 B
YAML
19 lines
525 B
YAML
- name: Install python requirements
|
|
ansible.builtin.package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop:
|
|
- python3-yaml # for docker compose_v2
|
|
- python3-requests # for docker network
|
|
|
|
- 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
|