mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-09 22:41:03 +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"
|
||||
systemd:
|
||||
name: mailu
|
||||
state: restarted
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
become: yes
|
||||
- name: rescreate mailu
|
||||
command:
|
||||
cmd: docker-compose -p mailu up -d --force-recreate
|
||||
chdir: /usr/local/bin/mailu/
|
||||
|
@ -21,14 +21,8 @@
|
||||
|
||||
- name: add 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
|
||||
template: src=mailu.env.j2 dest=/usr/local/bin/mailu/mailu.env
|
||||
notify: restart mailu
|
||||
|
||||
- name: "install mailu service"
|
||||
copy:
|
||||
src: "mailu.service"
|
||||
dest: "/etc/systemd/system/mailu.service"
|
||||
notify: restart mailu
|
||||
notify: rescreate mailu
|
||||
|
Loading…
Reference in New Issue
Block a user