add first working version
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
700f9f22f7
commit
38e1137e06
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
gamja_service_name: 'gamja-irc-webui'
|
||||
gamja_service_path: '/data/{{ gamja_service_name }}'
|
||||
gamja_web_path: '{{ gamja_service_path }}/dist'
|
||||
|
||||
gamja_git_repo: 'https://git.sr.ht/~emersion/gamja'
|
||||
gamja_git_ref: '2d271685297431d64d4e42951300cd05536fcf6c'
|
||||
|
||||
gamja_config_url: 'wss://irc.example.org:8097'
|
||||
gamja_config_auth: 'optional'
|
||||
gamja_config_nick: 'Guest-*'
|
||||
gamja_config_autoconnect: false
|
||||
gamja_config_ping: 60
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Clone repository
|
||||
git:
|
||||
repo: '{{ gamja_git_repo }}'
|
||||
version: '{{ gamja_git_ref }}'
|
||||
dest: '{{ gamja_service_path }}'
|
||||
force: true
|
||||
update: true
|
||||
|
||||
- name: Install Node.js
|
||||
apt:
|
||||
name:
|
||||
- nginx-light
|
||||
- nodejs
|
||||
- npm
|
||||
|
||||
- name: Install dependencies
|
||||
command: 'npm install'
|
||||
args:
|
||||
chdir: '{{ gamja_service_path }}'
|
||||
|
||||
- name: Build website
|
||||
command: 'npm run build'
|
||||
args:
|
||||
chdir: '{{ gamja_service_path }}'
|
||||
|
||||
- name: Create config file
|
||||
template:
|
||||
src: 'config.json.j2'
|
||||
dest: '{{ gamja_web_path }}/config.json'
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"server": {
|
||||
"url": "{{ gamja_config_url | mandatory }}",
|
||||
"auth": "{{ gamja_config_auth | mandatory }}",
|
||||
"nick": "{{ gamja_config_nick | mandatory }}",
|
||||
"autoconnect": {{ gamja_config_autoconnect | to_json }},
|
||||
"ping": {{ gamja_config_autoconnect | int }}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue