optimized mailu paths

This commit is contained in:
Kevin Veen-Birkenbach 2020-12-28 21:24:32 +01:00
parent 5e1a7119ac
commit 5595907433
4 changed files with 19 additions and 13 deletions

View File

@ -2,11 +2,11 @@
## setup ## setup
### volumes ### delete data
To delete all volumes and data execute: To delete all volumes and data execute:
```bash ```bash
rm -vr /mailu/; docker volume rm $(docker volume ls -q | grep mailu_) rm -vr /etc/mailu/; docker volume rm $(docker volume ls -q | grep mailu_)
``` ```
Be careful! Be careful!
@ -25,10 +25,10 @@ to verify that there aren't port conflicts
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: 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 ```bash
docker-compose -p mailu exec admin flask mailu admin admin {{hostname}} PASSWORD docker-compose -p mailu exec admin flask mailu admin {{admin}} {{hostname}} PASSWORD
``` ```
### user management ### cli user management
How to manage users is described here: https://mailu.io/master/cli.html How to manage users is described here: https://mailu.io/master/cli.html
### Up ### Up

View File

@ -4,7 +4,7 @@ After=network.target docker.service
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/mailu WorkingDirectory=/usr/local/bin/mailu
ExecStart=/bin/docker-compose up ExecStart=/bin/docker-compose up
ExecStop=/bin/docker-compose down ExecStop=/bin/docker-compose down

View File

@ -7,18 +7,24 @@
template: src=domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf template: src=domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx notify: restart nginx
- name: "create mailu dir" - name: "create /etc/mailu/"
file: file:
path: "/mailu" path: "/etc/mailu"
state: directory
mode: 0755
- name: "create /usr/local/bin/mailu/"
file:
path: "/usr/local/bin/mailu"
state: directory state: directory
mode: 0755 mode: 0755
- name: add docker-compose.yml - name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest=/mailu/docker-compose.yml template: src=docker-compose.yml.j2 dest=/usr/local/bin/mailu/docker-compose.yml
notify: restart mailu notify: restart mailu
- name: add mailu.env - name: add mailu.env
template: src=mailu.env.j2 dest=/mailu/mailu.env template: src=mailu.env.j2 dest=/usr/local/bin/mailu/mailu.env
notify: restart mailu notify: restart mailu
- name: "install mailu service" - name: "install mailu service"

View File

@ -38,7 +38,7 @@ services:
- "{{ ip4_address }}:993:993" - "{{ ip4_address }}:993:993"
volumes: volumes:
- "/etc/letsencrypt:/certs/letsencrypt:ro" - "/etc/letsencrypt:/certs/letsencrypt:ro"
- "/mailu/overrides/nginx:/overrides" - "/etc/mailu/overrides/nginx:/overrides"
- "front_certs:/certs" - "front_certs:/certs"
admin: admin:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.8} image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.8}
@ -55,7 +55,7 @@ services:
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "dovecot_mail:/mail" - "dovecot_mail:/mail"
- "/mailu/overrides:/overrides" - "/etc/mailu/overrides:/overrides"
depends_on: depends_on:
- front - front
@ -64,7 +64,7 @@ services:
restart: always restart: always
env_file: mailu.env env_file: mailu.env
volumes: volumes:
- "/mailu/overrides:/overrides" - "/etc/mailu/overrides:/overrides"
- "smtp_queue:/queue" - "smtp_queue:/queue"
depends_on: depends_on:
- front - front
@ -76,7 +76,7 @@ services:
volumes: volumes:
- "filter:/var/lib/rspamd" - "filter:/var/lib/rspamd"
- "dkim:/dkim" - "dkim:/dkim"
- "/mailu/overrides/rspamd:/etc/rspamd/override.d" - "/etc/mailu/overrides/rspamd:/etc/rspamd/override.d"
depends_on: depends_on:
- front - front