Commit 465a974b authored by okhin's avatar okhin 🚴

Adding more stuff to the deploy jobs

parent a81fcdee
Pipeline #1316 failed
......@@ -4,9 +4,14 @@ stages:
deploy preprod:
variables:
BASE_PATH: /srv/generateur-slogans
PORT: 8080
stage: deploy
tags: [preprod]
script:
- rsync -ruvC ./ $BASE_PATH
- cd $BASE_PATH
- echo "{'port': '${PORT}'}" > config.json
- npm install
- pm2 restart srv.js
only:
- master
......@@ -4,13 +4,16 @@ This project is the slogan generator used by LQDN for the donation compaign of y
## 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
apt install nodejs libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev build-essential g++
```
```sh
sudo npm install -g pm2
cp config.json.default config.json
npm install
```
......@@ -18,5 +21,5 @@ npm install
## Run
```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