fixes
This commit is contained in:
parent
ef7471b3dd
commit
3bfceed585
|
@ -1,2 +1,2 @@
|
|||
[servers]
|
||||
club_secure
|
||||
club_mail
|
||||
|
|
25
deploy/roles/docker/tasks/main.yml
Normal file
25
deploy/roles/docker/tasks/main.yml
Normal 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
|
||||
|
3
deploy/roles/mailserver/meta/main.yml
Normal file
3
deploy/roles/mailserver/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: docker }
|
|
@ -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
|
||||
|
|
|
@ -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,12 +241,12 @@ 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:
|
||||
networks:
|
||||
default:
|
||||
|
||||
volumes:
|
||||
|
|
Loading…
Reference in a new issue