Merge branch 'codimd_1_3' into 'master'

Update to CodiMD 1.3.0

See merge request aurore/ansible!14
This commit is contained in:
Alexandre IOOSS 2019-03-04 16:05:17 +01:00
commit a03092a5e0
3 changed files with 17 additions and 20 deletions

View file

@ -1,7 +1,8 @@
--- ---
# Build front-end bundle # Build front-end bundle
# This can take very long and requires > 2GB of RAM
- name: Build front-end for CodiMD - name: Build front-end for CodiMD
command: npm run build command: NODE_ENV="production" yarn run build
args: args:
chdir: /var/local/codimd/codimd chdir: /var/local/codimd/codimd
become: true become: true

View file

@ -9,6 +9,11 @@
dest: /etc/apt/preferences.d/nodejs dest: /etc/apt/preferences.d/nodejs
mode: 0644 mode: 0644
# TODO
# apt-transport-https
# curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
# echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# Install CodiMD dependencies # Install CodiMD dependencies
- name: Install required packages - name: Install required packages
apt: apt:
@ -20,4 +25,4 @@
- nodejs - nodejs
- npm - npm
- build-essential - build-essential
- zlib1g-dev # uws module - yarn

View file

@ -6,19 +6,18 @@
- include_tasks: 1_user_group.yml - include_tasks: 1_user_group.yml
# Download CodiMD # Download CodiMD
# TODO : temporally disabled until 1.3.0 is out (because of uws bug) - name: Clone CodiMD project
# - name: Clone CodiMD project git:
# git: repo: https://github.com/hackmdio/codimd.git
# repo: https://github.com/hackmdio/codimd.git dest: /var/local/codimd/codimd
# dest: /var/local/codimd/codimd version: 1.3.0
# version: 1.2.1 become: true
# become: true become_user: codimd
# become_user: codimd notify: Build front-end for CodiMD
# notify: Build front-end for CodiMD
# Setup dependencies and configs # Setup dependencies and configs
- name: Install CodiMD depedencies - name: Install CodiMD depedencies
command: bin/setup command: NODE_ENV="production" bin/setup
args: args:
chdir: /var/local/codimd/codimd chdir: /var/local/codimd/codimd
become: true become: true
@ -33,14 +32,6 @@
group: codimd group: codimd
mode: 0600 mode: 0600
# Update database
- name: Migrate the db to the latest schema
command: node_modules/.bin/sequelize db:migrate
args:
chdir: /var/local/codimd/codimd
become: true
become_user: codimd
# Configure # Configure
- name: Configure CodiMD - name: Configure CodiMD
template: template: