forked from infra/ansible
hackmd: bump to version 1.8.1
This commit is contained in:
parent
be3c4f3cf7
commit
66ee1f011e
@ -1,4 +1,4 @@
|
||||
---
|
||||
|
||||
hackmd_version: 1.7.2
|
||||
hackmd_version: 1.8.1
|
||||
hackmd_archive: https://github.com/hedgedoc/hedgedoc/archive/{{ hackmd_version }}.tar.gz
|
||||
|
@ -10,7 +10,7 @@
|
||||
apt_key: url="https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
|
||||
|
||||
- name: Enable nodesource repository
|
||||
apt_repository: repo="deb https://deb.nodesource.com/node_8.x/ {{ ansible_distribution_release }} main"
|
||||
apt_repository: repo="deb https://deb.nodesource.com/node_14.x/ {{ ansible_distribution_release }} main"
|
||||
|
||||
- name: Enable yarnpkg apt-key
|
||||
apt_key: url="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||
@ -60,8 +60,14 @@
|
||||
register: hackmd_config
|
||||
notify: Restart hackmd
|
||||
|
||||
- name: Install hackmd frontend deps
|
||||
command: /usr/bin/yarn install chdir=/opt/hedgedoc-{{ hackmd_version }}
|
||||
become: true
|
||||
become_user: hackmd
|
||||
when: hackmd_unarchive.changed or hackmd_config.changed
|
||||
|
||||
- name: Build hackmd frontend
|
||||
command: /usr/bin/yarn run build chdir=/opt/hedgedoc-{{ hackmd_version }}
|
||||
command: /usr/bin/yarn build chdir=/opt/hedgedoc-{{ hackmd_version }}
|
||||
become: true
|
||||
become_user: hackmd
|
||||
when: hackmd_unarchive.changed or hackmd_config.changed
|
||||
@ -76,15 +82,6 @@
|
||||
become: true
|
||||
become_user: postgres
|
||||
|
||||
- name: Configure sequelize
|
||||
template: src=_sequelizerc.j2 dest=/opt/hedgedoc-{{ hackmd_version }}/.sequelizerc owner=hackmd
|
||||
|
||||
- name: Upgrade database schema
|
||||
command: node_modules/.bin/sequelize db:migrate chdir=/opt/hedgedoc-{{ hackmd_version }}
|
||||
become: true
|
||||
become_user: hackmd
|
||||
when: hackmd_unarchive.changed or hackmd_config.changed
|
||||
|
||||
- name: Ensure certificates are available
|
||||
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ hackmd_domain }}.key -out /etc/nginx/ssl/{{ hackmd_domain }}.crt -days 730 -subj "/CN={{ hackmd_domain }}" creates=/etc/nginx/ssl/{{ hackmd_domain }}.crt
|
||||
notify: Restart nginx
|
||||
|
@ -1,8 +0,0 @@
|
||||
var path = require('path');
|
||||
|
||||
module.exports = {
|
||||
'config': path.resolve('config.json'),
|
||||
'migrations-path': path.resolve('lib', 'migrations'),
|
||||
'models-path': path.resolve('lib', 'models'),
|
||||
'url': 'postgres://{{ hackmd_dbuser }}:{{ hackmd_dbpass }}@localhost:5432/{{ hackmd_dbname }}'
|
||||
}
|
@ -7,7 +7,7 @@ Environment=NODE_ENV=production
|
||||
WorkingDirectory=/opt/hedgedoc-{{ hackmd_version }}
|
||||
Type=simple
|
||||
User=hackmd
|
||||
ExecStart=/usr/bin/node /opt/hedgedoc-{{ hackmd_version }}/app.js
|
||||
ExecStart=/usr/bin/yarn start
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
|
Loading…
Reference in New Issue
Block a user