This commit is contained in:
Aeris 2018-12-28 22:03:40 +01:00
parent ef7471b3dd
commit 3bfceed585
5 changed files with 50 additions and 12 deletions

View file

@ -1,2 +1,2 @@
[servers]
club_secure
club_mail

View file

@ -0,0 +1,25 @@
- name: Install and start docker
environment:
PYTHONPATH: "/usr/local/lib/python2.7/dist-packages"
block:
- apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/debian buster stable
state: present
- apt:
name: docker-ce
state: present
- pip:
name: docker-compose
- systemd:
enabled: yes
state: started
daemon_reload: yes
name: docker

View file

@ -0,0 +1,3 @@
---
dependencies:
- { role: docker }

View file

@ -17,6 +17,11 @@
name: "{{ docker_project_folder }}/mailserver/nginx"
state: directory
- name: Create db folder
file:
name: "{{ docker_project_folder }}/mailserver/db"
state: directory
- name: Copy nginx config \#1
template:
src: mailman-web.conf.j2
@ -32,6 +37,11 @@
src: smtp
dest: "{{ docker_project_folder }}/mailserver"
- name: Create nginx include folder
file:
name: "{{ docker_project_folder }}/mailserver/webmail"
state: directory
- name: Copy webmail Add
template:
src: config.inc.php.j2
@ -87,13 +97,13 @@
- name: Copy mailman-conf
copy:
src: mailman-extra.cfg
src: mailman/mailman-extra.cfg
dest: "{{ docker_project_folder }}/mailserver/mailman-extra.cfg"
- name: New Mysql EntryPoint
copy:
src: docker-entrypoint.sh
dest: "{{ docker_project_folder }}/mailserver/docker-entrypoint.sh"
src: db/docker-entrypoint.sh
dest: "{{ docker_project_folder }}/mailserver/db/docker-entrypoint.sh"
mode: "555"
- name: Copy docker-compose

View file

@ -29,8 +29,8 @@ services:
labels:
- "traefik.enable=false"
networks:
defualt:
alias:
default:
aliases:
- smtp
imap:
@ -113,7 +113,7 @@ services:
- db:db
depends_on:
- db
image: hardware/postfixadmin:latest
image: hardware/postfixadmin
expose:
- "8888"
restart: always
@ -131,7 +131,7 @@ services:
db:
container_name: mariadb
image: mariadb:10.3
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: {{ DB_ROOT_PASSWORD }}
@ -224,7 +224,7 @@ services:
traefik:
container_name: traefik
image: traefik
image: traefik:alpine
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
restart: always
ports:
@ -241,13 +241,13 @@ services:
container_name: extractor
image: danielhuisman/traefik-certificate-extractor
volumes:
- {{ docker_data_folder }}/mailserver/traefik:/app/data
- {{ docker_project_folder }}/mailserver/traefik:/app/data
- certs:/app/certs_flat
labels:
- "traefik.enable=false"
networks:
default:
networks:
default:
volumes:
mails: