Commit 465a974b authored by okhin's avatar okhin 🚴
Browse files

Adding more stuff to the deploy jobs

parent a81fcdee
Pipeline #1316 failed
...@@ -4,9 +4,14 @@ stages: ...@@ -4,9 +4,14 @@ stages:
deploy preprod: deploy preprod:
variables: variables:
BASE_PATH: /srv/generateur-slogans BASE_PATH: /srv/generateur-slogans
PORT: 8080
stage: deploy stage: deploy
tags: [preprod] tags: [preprod]
script: script:
- rsync -ruvC ./ $BASE_PATH - rsync -ruvC ./ $BASE_PATH
- cd $BASE_PATH
- echo "{'port': '${PORT}'}" > config.json
- npm install
- pm2 restart srv.js
only: only:
- master - master
...@@ -4,13 +4,16 @@ This project is the slogan generator used by LQDN for the donation compaign of y ...@@ -4,13 +4,16 @@ This project is the slogan generator used by LQDN for the donation compaign of y
## Installation ## Installation
The back-end server require node.js (v6.11.X), npm and cairo. Here is the installation command for debian based systems: The back-end server require node.js (v6.11.X), npm and cairo. To daemonize the backend, we're going to use pm2.
Here is the installation command for debian based systems:
```sh ```sh
apt install nodejs libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev build-essential g++ apt install nodejs libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev build-essential g++
``` ```
```sh ```sh
sudo npm install -g pm2
cp config.json.default config.json cp config.json.default config.json
npm install npm install
``` ```
...@@ -18,5 +21,5 @@ npm install ...@@ -18,5 +21,5 @@ npm install
## Run ## Run
```sh ```sh
npm run sudo pm2 start srv.js
``` ```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment