working ansible role???
This commit is contained in:
parent
d43add046d
commit
0e8b30d081
6 changed files with 18 additions and 6 deletions
|
@ -23,7 +23,7 @@ chatbridge_admin_token: CHANGEME
|
||||||
chatbridge_postgres_user: chatbridge
|
chatbridge_postgres_user: chatbridge
|
||||||
chatbridge_postgres_password: CHANGEME
|
chatbridge_postgres_password: CHANGEME
|
||||||
chatbridge_postgres_db: chatbridge
|
chatbridge_postgres_db: chatbridge
|
||||||
chatbridge_postgres_port: 6500
|
chatbridge_postgres_port: 5432
|
||||||
|
|
||||||
# slack config
|
# slack config
|
||||||
chatbridge_slack_client_id: CHANGEME
|
chatbridge_slack_client_id: CHANGEME
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
copy:
|
copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
src: "{{ chatbridge_user_home }}/chatbridge/client/dist/"
|
src: "{{ chatbridge_user_home }}/chatbridge/client/dist/"
|
||||||
dest: "{{ chatbridge_public_dir }}"
|
dest: "/var/www/html{{ chatbridge_webroot }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,18 @@
|
||||||
src: chatbridge_env.j2
|
src: chatbridge_env.j2
|
||||||
dest: "{{ chatbridge_user_home}}/chatbridge/server/.env"
|
dest: "{{ chatbridge_user_home}}/chatbridge/server/.env"
|
||||||
mode: "600"
|
mode: "600"
|
||||||
|
when:
|
||||||
|
- CHATBRIDGE_MODE == 'development'
|
||||||
|
|
||||||
|
- name: create production .env
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ chatbridge_user }}"
|
||||||
|
template:
|
||||||
|
src: chatbridge_env.j2
|
||||||
|
dest: "{{ chatbridge_user_home}}/chatbridge/server/dist/.env"
|
||||||
|
mode: "600"
|
||||||
|
when:
|
||||||
|
- CHATBRIDGE_MODE == 'production'
|
||||||
|
|
||||||
- name: create https nginx config
|
- name: create https nginx config
|
||||||
become: yes
|
become: yes
|
||||||
|
|
|
@ -13,4 +13,3 @@
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ item.browser_download_url }}"
|
url: "{{ item.browser_download_url }}"
|
||||||
dest: "{{ chatbridge_matterbridge_binary }}"
|
dest: "{{ chatbridge_matterbridge_binary }}"
|
||||||
creates: "{{ chatbridge_matterbridge_binary }}"
|
|
||||||
|
|
|
@ -16,7 +16,8 @@ server {
|
||||||
|
|
||||||
location {{ chatbridge_webroot }} {
|
location {{ chatbridge_webroot }} {
|
||||||
root {{ chatbridge_public_dir }};
|
root {{ chatbridge_public_dir }};
|
||||||
try_files $uri $uri/ $uri/index.html /index.html index.html;
|
index index.html;
|
||||||
|
try_files $uri $uri/ $uri/index.html =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
Description=Chatbridge
|
Description=Chatbridge
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/node {{ chatbridge_user_home }}/chatbridge/server/dist/src/app.js
|
ExecStart=/usr/bin/node {{ chatbridge_user_home }}/chatbridge/server/dist/src/app.js
|
||||||
Restart=always
|
Restart=always
|
||||||
User={{ chatbridge_user }}
|
User={{ chatbridge_user }}
|
||||||
Group=nogroup
|
Group=nogroup
|
||||||
Environment=PATH=/usr/bin:/usr/local/bin
|
Environment=PATH=/usr/bin:/usr/local/bin
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
WorkingDirectory={{ chatbridge_user_home }}/chatbridge/server/dist/src/
|
WorkingDirectory={{ chatbridge_user_home }}/chatbridge/server/dist/
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Reference in a new issue