better documentation
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
---
|
||||
layout: default
|
||||
title: Classic
|
||||
permalink: /install/classic
|
||||
title: Debian
|
||||
permalink: /install/debian
|
||||
parent: Install
|
||||
---
|
||||
|
||||
## Install
|
||||
## Debian installation
|
||||
|
||||
1. Install Node.js and postgreSQL
|
||||
1. Install Node.js & yarn (**from root**)
|
||||
```bash
|
||||
curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||
apt-get install -y nodejs postgresql
|
||||
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
|
||||
```
|
||||
<small>[source](https://github.com/nodesource/distributions/blob/master/README.md)</small>
|
||||
|
||||
1. Install Gancio
|
||||
```bash
|
||||
npm install --global gancio
|
||||
yarn add gancio --prod
|
||||
```
|
||||
1. Create a database (optional as you can use sqlite, but recommended)
|
||||
|
||||
1. Setup with postgreSQL (optional as you can choose sqlite)
|
||||
```bash
|
||||
sudo -u postgres psql
|
||||
apt-get install postgresql
|
||||
# Create the database
|
||||
su postgres -c psql
|
||||
postgres=# create database gancio;
|
||||
postgres=# create user gancio with encrypted password 'gancio';
|
||||
postgres=# grant all privileges on database gancio to gancio;
|
||||
@@ -44,12 +51,12 @@ gancio start --config config.json
|
||||
```
|
||||
1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup.
|
||||
|
||||
1. [Setup nginx as a proxy](/setup/nginx)
|
||||
1. [Setup nginx as a proxy](/install/nginx)
|
||||
|
||||
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/)**:
|
||||
If you don't use the [docker way](/install/docker), in production you should use something like **[pm2](http://pm2.keymetrics.io/)**:
|
||||
|
||||
```bash
|
||||
sudo npm install --global pm2
|
||||
sudo yarn global add pm2
|
||||
pm2 gancio start --config config.json
|
||||
```
|
||||
@@ -6,29 +6,41 @@ parent: Install
|
||||
---
|
||||
|
||||
## Install with docker
|
||||
|
||||
**You do not need to clone the full repo as we distribute gancio via npm.**
|
||||
[Dockerfile](https://git.lattuga.net/cisti/gancio/raw/docker/docker/Dockerfile) and [docker-compose.yml](https://git.lattuga.net/cisti/gancio/raw/docker/docker/docker-compose.yml) are the only needed files.
|
||||
A [Dockerfile](https://git.lattuga.net/cisti/gancio/raw/docker/docker/Dockerfile) and a docker-compose.yml are the only files needed.
|
||||
|
||||
1. Create a directory where everything related to gancio is stored (db, images, config)
|
||||
```bash
|
||||
mkdir /opt/gancio
|
||||
cd /opt/gancio
|
||||
```
|
||||
:information_source: you can choose a different directory of course
|
||||
:information_source: <small>you can choose a different directory.</small>
|
||||
|
||||
### Using postgreSQL
|
||||
1. Download docker-compose.yml and Dockerfile
|
||||
```bash
|
||||
wget https://git.lattuga.net/cisti/gancio/raw/master/docker/Dockerfile
|
||||
wget https://git.lattuga.net/cisti/gancio/raw/master/docker/docker-compose.yml
|
||||
wget https://git.lattuga.net/cisti/gancio/raw/master/docker/docker-compose.postgresql.yml -O docker.compose.yml
|
||||
```
|
||||
|
||||
1. Create an empty configuration file (db.sqlite only needed for sqlite
|
||||
setup)
|
||||
1. Create an empty configiguration (**this is needed**)
|
||||
```
|
||||
touch config.json
|
||||
```
|
||||
|
||||
### Using sqlite
|
||||
1. Download docker-compose.yml and Dockerfile
|
||||
```bash
|
||||
wget https://git.lattuga.net/cisti/gancio/raw/master/docker/Dockerfile
|
||||
wget https://git.lattuga.net/cisti/gancio/raw/master/docker/docker-compose.sqlite.yml -O docker-compose.yml
|
||||
```
|
||||
|
||||
1. Create an empty db and config (**this is needed**)
|
||||
```
|
||||
touch config.json db.sqlite
|
||||
```
|
||||
<small>After first setup, you can edit `config.json` file and restart the container on your needs.</small>
|
||||
|
||||
### Finish
|
||||
|
||||
1. Build docker image and launch interactive setup in one step
|
||||
```
|
||||
@@ -40,6 +52,8 @@ docker-compose run --rm gancio gancio setup --docker
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
1. [Setup nginx as a proxy](/setup/nginx)
|
||||
1. [Setup nginx as a proxy](/install/nginx)
|
||||
|
||||
1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you specified during setup and enjoy :tada:
|
||||
|
||||
1. You can edit `config.json` file and restart the container on your needs, see [Configuration](/config) for more details.
|
||||
@@ -7,10 +7,13 @@ nav_order: 2
|
||||
has_toc: false
|
||||
---
|
||||
|
||||
# Install
|
||||
# Install (production)
|
||||
|
||||
- [Install on Debian](/install/debian)
|
||||
- [Install using docker](/install/docker)
|
||||
|
||||
- [Classic install](/install/classic)
|
||||
- [Using docker](/install/docker)
|
||||
### Post installation
|
||||
- [Nginx as a proxy](/install/nginx)
|
||||
- [Hacking & contribute](../dev)
|
||||
|
||||
|
||||
If you wanna hack or run the current develop release take a look at [Hacking & contribute](../dev)
|
||||
|
||||
Reference in New Issue
Block a user