mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 20:51:07 +01:00
Changed docker startup process
This commit is contained in:
parent
ae171e52cf
commit
e3cafd3f0a
@ -1,12 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Mailu service
|
|
||||||
After=network.target docker.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/usr/local/bin/mailu
|
|
||||||
ExecStart=/bin/docker-compose up
|
|
||||||
ExecStop=/bin/docker-compose down
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: "restart mailu"
|
- name: rescreate mailu
|
||||||
systemd:
|
command:
|
||||||
name: mailu
|
cmd: docker-compose -p mailu up -d --force-recreate
|
||||||
state: restarted
|
chdir: /usr/local/bin/mailu/
|
||||||
enabled: yes
|
|
||||||
daemon_reload: yes
|
|
||||||
become: yes
|
|
||||||
|
@ -21,14 +21,8 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest=/usr/local/bin/mailu/docker-compose.yml
|
template: src=docker-compose.yml.j2 dest=/usr/local/bin/mailu/docker-compose.yml
|
||||||
notify: restart mailu
|
notify: rescreate mailu
|
||||||
|
|
||||||
- name: add mailu.env
|
- name: add mailu.env
|
||||||
template: src=mailu.env.j2 dest=/usr/local/bin/mailu/mailu.env
|
template: src=mailu.env.j2 dest=/usr/local/bin/mailu/mailu.env
|
||||||
notify: restart mailu
|
notify: rescreate mailu
|
||||||
|
|
||||||
- name: "install mailu service"
|
|
||||||
copy:
|
|
||||||
src: "mailu.service"
|
|
||||||
dest: "/etc/systemd/system/mailu.service"
|
|
||||||
notify: restart mailu
|
|
||||||
|
Loading…
Reference in New Issue
Block a user