Add maildev install
This commit is contained in:
parent
5030aab3bc
commit
6afc7ca9c3
@ -16,6 +16,7 @@ Available services
|
|||||||
- Traefik
|
- Traefik
|
||||||
- Watchtower
|
- Watchtower
|
||||||
- Grafana
|
- Grafana
|
||||||
|
- Maildev
|
||||||
|
|
||||||
Role variables
|
Role variables
|
||||||
---------------
|
---------------
|
||||||
@ -48,9 +49,12 @@ Example variables
|
|||||||
- traefik
|
- traefik
|
||||||
- watchtower
|
- watchtower
|
||||||
- grafana
|
- grafana
|
||||||
|
- maildev
|
||||||
|
|
||||||
traefik_domain: 'mydomain.com'
|
traefik_domain: 'mydomain.com'
|
||||||
traefik_letsencrypt_email: 'cert@mydomain.com'
|
traefik_letsencrypt_email: 'cert@mydomain.com'
|
||||||
|
|
||||||
|
maildev_domain: 'maildev.mydomain.com'
|
||||||
```
|
```
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
@ -3,16 +3,26 @@
|
|||||||
systemd:
|
systemd:
|
||||||
name: docker-compose@traefik
|
name: docker-compose@traefik
|
||||||
state: restarted
|
state: restarted
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
tags: ['docker_traefik']
|
tags: ['docker_traefik']
|
||||||
|
|
||||||
- name: watchtower-restart
|
- name: watchtower-restart
|
||||||
systemd:
|
systemd:
|
||||||
name: docker-compose@watchtower
|
name: docker-compose@watchtower
|
||||||
state: restarted
|
state: restarted
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
tags: ['docker_watchtower']
|
tags: ['docker_watchtower']
|
||||||
|
|
||||||
- name: grafana-restart
|
- name: grafana-restart
|
||||||
systemd:
|
systemd:
|
||||||
name: docker-compose@grafana
|
name: docker-compose@grafana
|
||||||
state: restarted
|
state: restarted
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
tags: ['docker_grafana']
|
tags: ['docker_grafana']
|
||||||
|
|
||||||
|
- name: maildev-restart
|
||||||
|
systemd:
|
||||||
|
name: docker-compose@maildev
|
||||||
|
state: restarted
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
|
tags: ['docker_maildev']
|
||||||
|
@ -34,4 +34,5 @@
|
|||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
name: docker-compose@{{ service }}
|
name: docker-compose@{{ service }}
|
||||||
enabled: true
|
enabled: true
|
||||||
|
ignore_errors: '{{ ansible_check_mode }}'
|
||||||
tags: [ 'docker_{{ service }}' ]
|
tags: [ 'docker_{{ service }}' ]
|
||||||
|
9
tasks/maildev.yml
Normal file
9
tasks/maildev.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: maildev | check vars are defined
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- maildev_domain is defined
|
||||||
|
tags: ['docker_maildev']
|
||||||
|
|
||||||
|
- include_tasks: base.yml
|
||||||
|
tags: ['docker_maildev']
|
@ -13,5 +13,6 @@
|
|||||||
- docker_traefik
|
- docker_traefik
|
||||||
- docker_watchtower
|
- docker_watchtower
|
||||||
- docker_grafana
|
- docker_grafana
|
||||||
|
- docker_maildev
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ docker_services }}"
|
- "{{ docker_services }}"
|
||||||
|
24
templates/compose/maildev.yml.j2
Normal file
24
templates/compose/maildev.yml.j2
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
maildev:
|
||||||
|
container_name: maildev
|
||||||
|
image: maildev/maildev:{{ maildev_version | default("latest") }}
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "1080:1080"
|
||||||
|
- "1025:1025"
|
||||||
|
labels:
|
||||||
|
traefik.enable: true
|
||||||
|
traefik.docker.network: traefik
|
||||||
|
traefik.http.routers.maildev.rule: Host(`{{ maildev_domain }}`)
|
||||||
|
traefik.http.routers.maildev.tls: true
|
||||||
|
traefik.http.routers.maildev.tls.certresolver: letsencrypt
|
||||||
|
traefik.http.routers.maildev.entrypoints: websecure
|
||||||
|
traefik.http.services.maildev.loadbalancer.server.port: 1080
|
||||||
|
networks:
|
||||||
|
- traefik
|
Loading…
x
Reference in New Issue
Block a user