Added poa-blockscout service
This commit is contained in:
parent
d3d92f4f59
commit
ae68437341
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: restart poa-blockscout
|
||||
service: name=poa-blockscout state=restarted
|
|
@ -50,5 +50,10 @@
|
|||
state: present
|
||||
become: true
|
||||
|
||||
- name: Start server
|
||||
shell: cd {{ home }}/blockscout && mix phx.server
|
||||
- name: Install poa-blockscout service
|
||||
template: src=poa-blockscout.j2 dest=/etc/systemd/system/poa-blockscout.service owner={{ username }} group={{ username }} mode=0755
|
||||
notify:
|
||||
- restart poa-blockscout
|
||||
|
||||
- name: Ensure poa-blockscout is running and enabled to start at boot
|
||||
service: name=poa-blockscout state=started enabled=yes
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=poa blockscout service
|
||||
After=network.target
|
||||
[Service]
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory={{ home }}/blockscout
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
ExecStartPre=/usr/local/bin/mix local.hex --force
|
||||
ExecStart=/usr/local/bin/mix phx.server
|
||||
Type=simple
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue