gancio/docs/install/classic.md

56 lines
1.3 KiB
Markdown
Raw Normal View History

---
layout: default
title: Classic
2019-07-27 13:04:06 +02:00
permalink: /install/classic
parent: Install
---
2019-07-27 13:04:06 +02:00
## Install
2019-07-17 00:41:08 +02:00
1. Install Node.js and postgreSQL
```bash
curl -sL https://deb.nodesource.com/setup_12.x | bash -
2019-07-17 00:41:08 +02:00
apt-get install -y nodejs postgresql
```
<small>[source](https://github.com/nodesource/distributions/blob/master/README.md)</small>
2019-07-17 00:41:08 +02:00
1. Install Gancio
```bash
npm install --global gancio
```
2019-07-17 00:41:08 +02:00
1. Create a database (optional as you can use sqlite, but recommended)
```bash
2019-07-17 00:41:08 +02:00
sudo -u postgres psql
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
```bash
2019-07-15 23:35:59 +02:00
adduser gancio
su gancio
```
2019-07-17 00:41:08 +02:00
1. Test & launch interactive setup
```bash
gancio --help
2019-07-25 11:01:08 +02:00
gancio setup --config config.json
```
2019-07-17 00:41:08 +02:00
1. Start
```bash
2019-07-15 23:35:59 +02:00
gancio --help
2019-07-25 11:01:08 +02:00
gancio start --config config.json
```
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-17 00:41:08 +02:00
1. [Setup nginx as a proxy](/setup/nginx)
2019-07-17 00:41:08 +02:00
1. Deploy in production
If you don't use the [docker way](/setup/docker), in production you should use something like **[pm2](http://pm2.keymetrics.io/)**:
2019-07-17 00:41:08 +02:00
```bash
sudo npm install --global pm2
2019-07-25 11:01:08 +02:00
pm2 gancio start --config config.json
2019-07-17 00:41:08 +02:00
```