-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnewslynx-app.yaml
47 lines (38 loc) · 976 Bytes
/
newslynx-app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
- include: node.yaml
- name: clone newslynx-app to remote server
git: |
repo=git://github.com/newslynx/newslynx-app.git
dest={{home}}/newslynx-app
accept_hostkey=true
ignore_errors: yes
- name: checkout branch
command: "git checkout {{app_branch}}"
args:
chdir: "{{home}}/newslynx-app/"
ignore_errors: yes
sudo: yes
- name: pull
command: "git pull origin {{app_branch}}"
args:
chdir: "{{home}}/newslynx-app/"
sudo: yes
ignore_errors: yes
- name: install app dependencies
command: sudo npm install
args:
chdir: "{{home}}/newslynx-app"
sudo: yes
- name: start app
command: "npm run start-automation"
args:
chdir: "{{home}}/newslynx-app"
sudo: yes
# broker via nginx.
- include: nginx.yaml
vars:
port: "{{app_port}}"
host: "{{app_host}}"
log_file: "{{home}}/logs/access.log"
worker_connections: "{{app_nginx_worker_connections}}"
worker_processes: "{{app_nginx_worker_processes}}"