mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-09 22:41:03 +01:00
Implemented mailu draft
This commit is contained in:
parent
46837c3eff
commit
c793e01c2d
@ -6,8 +6,17 @@ Execute
|
|||||||
```bash
|
```bash
|
||||||
netstat -tulpn
|
netstat -tulpn
|
||||||
```
|
```
|
||||||
|
|
||||||
to verify that there aren't port conflicts
|
to verify that there aren't port conflicts
|
||||||
|
|
||||||
|
# admin account
|
||||||
|
|
||||||
|
Before you can use Mailu, you must create the primary administrator user account. This should be admin@{{hostname}}. Use the following command, changing PASSWORD to your liking:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose -p mailu exec admin flask mailu admin admin {{hostname}} PASSWORD
|
||||||
|
```
|
||||||
|
|
||||||
## See
|
## See
|
||||||
- https://gist.github.com/marienfressinaud/f284a59b18aad395eb0de2d22836ae6b
|
- https://gist.github.com/marienfressinaud/f284a59b18aad395eb0de2d22836ae6b
|
||||||
- https://mailu.io/1.7/compose/setup.html
|
- https://mailu.io/1.7/compose/setup.html
|
||||||
|
2
roles/docker-mailu/meta/main.yml
Normal file
2
roles/docker-mailu/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dependencies:
|
||||||
|
- native-nginx-docker-proxy
|
@ -1,30 +1,28 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: configure {{domain}}.conf
|
||||||
|
template: src=domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||||
|
notify: restart nginx
|
||||||
|
|
||||||
- name: "Create mailu dir"
|
- name: "Create mailu dir"
|
||||||
file:
|
file:
|
||||||
path: "/mailu"
|
path: "/mailu"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: "Add docker-compose.yml"
|
- name: "Add docker-compose.yml"
|
||||||
copy:
|
copy:
|
||||||
src: "docker-compose.yml"
|
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/docker-compose.yml"
|
||||||
dest: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/docker-compose.yml"
|
dest: "/mailu/docker-compose.yml"
|
||||||
force: no
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: "Add mailu.env"
|
- name: "Add mailu.env"
|
||||||
copy:
|
copy:
|
||||||
src: "mailu.env"
|
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/mailu.env"
|
||||||
dest: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/mailu.env"
|
dest: "/mailu/mailu.env"
|
||||||
force: no
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: "Install mailu service"
|
- name: "Install mailu service"
|
||||||
copy:
|
copy:
|
||||||
src: "mailu.service"
|
src: "mailu.service"
|
||||||
dest: "/etc/systemd/system/mailu.service"
|
dest: "/etc/systemd/system/mailu.service"
|
||||||
become: yes
|
|
||||||
notify:
|
notify:
|
||||||
- "Restart Mailu"
|
- "Restart Mailu"
|
||||||
|
18
roles/docker-mailu/templates/domain.conf.j2
Normal file
18
roles/docker-mailu/templates/domain.conf.j2
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
server
|
||||||
|
{
|
||||||
|
server_name {{domain}};
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
|
||||||
|
{% with http_port=https_port %}
|
||||||
|
{% include 'roles/native-nginx-docker-proxy/templates/proxy_pass.conf.j2'%}
|
||||||
|
{% endwith %}
|
||||||
|
}
|
||||||
|
|
||||||
|
server
|
||||||
|
{
|
||||||
|
server_name {{domain}};
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
{% include 'roles/native-nginx-docker-proxy/templates/proxy_pass.conf.j2'%}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user