2019-07-12 23:20:55 +02:00
|
|
|
---
|
|
|
|
layout: default
|
2019-08-06 01:12:05 +02:00
|
|
|
title: Debian
|
|
|
|
permalink: /install/debian
|
2019-07-27 13:04:06 +02:00
|
|
|
parent: Install
|
2019-07-12 23:20:55 +02:00
|
|
|
---
|
|
|
|
|
2019-08-06 01:12:05 +02:00
|
|
|
## Debian installation
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2019-08-06 01:12:05 +02:00
|
|
|
1. Install Node.js & yarn (**from root**)
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
|
|
|
curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
2019-08-06 01:12:05 +02:00
|
|
|
apt-get install -y nodejs
|
|
|
|
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
|
|
|
|
apt-get update && apt-get install yarn
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
|
|
|
<small>[source](https://github.com/nodesource/distributions/blob/master/README.md)</small>
|
2019-08-06 01:12:05 +02:00
|
|
|
|
2019-07-17 00:41:08 +02:00
|
|
|
1. Install Gancio
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2019-11-14 12:22:04 +01:00
|
|
|
yarn global add gancio --prod
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
2019-08-06 01:12:05 +02:00
|
|
|
|
2019-09-26 16:56:28 +02:00
|
|
|
1. Setup with postgreSQL __(optional as you can choose sqlite)__
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2019-08-06 01:12:05 +02:00
|
|
|
apt-get install postgresql
|
|
|
|
# Create the database
|
|
|
|
su postgres -c psql
|
2019-07-17 00:41:08 +02:00
|
|
|
postgres=# create database gancio;
|
|
|
|
postgres=# create user gancio with encrypted password 'gancio';
|
|
|
|
postgres=# grant all privileges on database gancio to gancio;
|
|
|
|
```
|
|
|
|
|
|
|
|
1. Create a user to run gancio from
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2019-07-15 23:35:59 +02:00
|
|
|
adduser gancio
|
|
|
|
su gancio
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. Launch interactive setup
|
2019-07-17 00:41:08 +02:00
|
|
|
```bash
|
2019-07-25 11:01:08 +02:00
|
|
|
gancio setup --config config.json
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
|
|
|
|
2019-07-17 00:41:08 +02:00
|
|
|
1. Start
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2019-07-25 11:01:08 +02:00
|
|
|
gancio start --config config.json
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
2019-07-17 00:41:08 +02:00
|
|
|
1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup.
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2019-08-06 01:12:05 +02:00
|
|
|
1. [Setup nginx as a proxy](/install/nginx)
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. To deploy gancio in production you should use something like **[pm2](http://pm2.keymetrics.io/)**:
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2019-07-17 00:41:08 +02:00
|
|
|
```bash
|
2019-08-06 01:12:05 +02:00
|
|
|
sudo yarn global add pm2
|
2019-09-24 11:46:11 +02:00
|
|
|
pm2 start gancio -- --config config.json
|
|
|
|
|
2019-09-26 16:56:28 +02:00
|
|
|
# Run this command to run your application as a service and automatically restart after a reboot:
|
|
|
|
pm2 startup # read the output!
|
|
|
|
sudo pm2 startup -u gancio
|
2019-07-17 00:41:08 +02:00
|
|
|
```
|
2019-09-26 16:56:28 +02:00
|
|
|
|
|
|
|
1. Upgrade
|
2019-11-13 10:35:30 +01:00
|
|
|
```bash
|
2019-09-26 16:56:28 +02:00
|
|
|
sudo yarn global add gancio
|
|
|
|
sudo service pm2 restart
|
2019-11-14 12:22:04 +01:00
|
|
|
```
|