Role that installs the parse service.

This commit is contained in:
Andrea Dell'Amico 2018-09-07 19:24:59 +02:00
parent 567d6564d5
commit a994495806
4 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,11 @@
---
parse_server_user: parsesrv
parse_server_user_home: /srv/parse
parse_server_npm_modules:
- parse-server
- pm2
parse_server_http_port: 1337
parse_server_db: parse_db
parse_server_mongodb_url: 'mongodb://localhost:27017/{{ parse_server_db }}'

View File

@ -0,0 +1,4 @@
---
dependencies:
- role: '../../library/roles/nginx'
- role: '../../library/roles/node_js'

View File

@ -0,0 +1,13 @@
---
- block:
- name: Create the parse user
user: name={{ parse_server_user }} home={{ parse_server_user_home }} createhome=no system=yes shell=/bin/bash
- name: Create the parse home directory
file: dest={{ parse_server_user_home }} owner={{ parse_server_user }} group={{ parse_server_user }} mode=0755 state=directory
- name: Install the parse server
npm: name={{ item }} global=yes state=present production=true
with_items: '{{ parse_server_npm_modules }}'
tags: [ 'parse', 'parse_server' ]

View File

@ -0,0 +1,3 @@
---
mongodb_version: 3.2
node_js_repo_version: 8