Add maildev install
This commit is contained in:
parent
5030aab3bc
commit
6afc7ca9c3
@ -16,6 +16,7 @@ Available services
|
||||
- Traefik
|
||||
- Watchtower
|
||||
- Grafana
|
||||
- Maildev
|
||||
|
||||
Role variables
|
||||
---------------
|
||||
@ -48,9 +49,12 @@ Example variables
|
||||
- traefik
|
||||
- watchtower
|
||||
- grafana
|
||||
- maildev
|
||||
|
||||
traefik_domain: 'mydomain.com'
|
||||
traefik_letsencrypt_email: 'cert@mydomain.com'
|
||||
|
||||
maildev_domain: 'maildev.mydomain.com'
|
||||
```
|
||||
|
||||
TODO
|
||||
|
@ -3,16 +3,26 @@
|
||||
systemd:
|
||||
name: docker-compose@traefik
|
||||
state: restarted
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
tags: ['docker_traefik']
|
||||
|
||||
- name: watchtower-restart
|
||||
systemd:
|
||||
name: docker-compose@watchtower
|
||||
state: restarted
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
tags: ['docker_watchtower']
|
||||
|
||||
- name: grafana-restart
|
||||
systemd:
|
||||
name: docker-compose@grafana
|
||||
state: restarted
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
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
|
||||
name: docker-compose@{{ service }}
|
||||
enabled: true
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
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_watchtower
|
||||
- docker_grafana
|
||||
- docker_maildev
|
||||
with_items:
|
||||
- "{{ 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