start with gancio
This commit is contained in:
parent
5fea64d59b
commit
b828e9fc16
2 changed files with 51 additions and 0 deletions
21
roles/gancio/meta/main.yml
Normal file
21
roles/gancio/meta/main.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
|
||||||
|
# install nodejs
|
||||||
|
- role: nodejs
|
||||||
|
|
||||||
|
# install postgres
|
||||||
|
# and create an etherpad user and db
|
||||||
|
- role: postgresql
|
||||||
|
vars:
|
||||||
|
username: gancio
|
||||||
|
password: "{{ database_password }}"
|
||||||
|
database: gancio
|
||||||
|
|
||||||
|
# install caddy and configure it as reverse proxy
|
||||||
|
- role: caddy
|
||||||
|
vars:
|
||||||
|
caddy_config: |
|
||||||
|
{{hostname}}
|
||||||
|
encode gzip
|
||||||
|
reverse_proxy localhost:31337
|
30
roles/gancio/tasks/main.yml
Normal file
30
roles/gancio/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: ensure gancio user is present
|
||||||
|
user:
|
||||||
|
name: "gancio"
|
||||||
|
home: "/srv/gancio"
|
||||||
|
shell: "/bin/bash"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: NODE | Install pm2
|
||||||
|
npm:
|
||||||
|
name: pm2
|
||||||
|
global: yes
|
||||||
|
production: yes
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: NODE | Install gancio
|
||||||
|
npm:
|
||||||
|
name: gancio
|
||||||
|
global: yes
|
||||||
|
production: yes
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: NODE | Start APP
|
||||||
|
become: true
|
||||||
|
become_user: gancio
|
||||||
|
shell: pm2 start gancio start --db="postgres"
|
||||||
|
args:
|
||||||
|
chdir: /srv/gancio
|
||||||
|
ignore_errors: yes
|
Loading…
Reference in a new issue