2019-07-12 23:20:55 +02:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
title: Docker
|
2019-07-27 13:04:06 +02:00
|
|
|
permalink: /install/docker
|
|
|
|
parent: Install
|
2019-07-12 23:20:55 +02:00
|
|
|
---
|
2019-09-24 11:46:11 +02:00
|
|
|
## Table of contents
|
|
|
|
{: .no_toc .text-delta }
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. TOC
|
|
|
|
{:toc}
|
|
|
|
|
|
|
|
## Initial setup
|
2019-07-17 00:41:08 +02:00
|
|
|
**You do not need to clone the full repo as we distribute gancio via npm.**
|
2019-09-25 14:38:16 +02:00
|
|
|
A Dockerfile and a docker-compose.yml are the only files needed.
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
- __Create a directory where everything related to gancio is stored (db, images, config)__
|
2019-07-17 00:41:08 +02:00
|
|
|
```bash
|
|
|
|
mkdir /opt/gancio
|
|
|
|
cd /opt/gancio
|
|
|
|
```
|
2019-09-24 11:46:11 +02:00
|
|
|
<small>note that you can choose a different directory.</small>
|
2019-07-17 00:41:08 +02:00
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
## Use sqlite
|
|
|
|
<div class='code-example bg-grey-lt-100' markdown="1">
|
|
|
|
1. **Download docker-compose.yml and Dockerfile**
|
2019-07-17 00:41:08 +02:00
|
|
|
```bash
|
2019-09-25 14:38:16 +02:00
|
|
|
wget https://gancio.org/docker/Dockerfile
|
|
|
|
wget https://gancio.org/docker/sqlite/docker-compose.yml
|
2019-07-17 00:41:08 +02:00
|
|
|
```
|
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. Create an empty db and config (**this is needed**)
|
2019-08-06 01:12:05 +02:00
|
|
|
```
|
2019-09-24 11:46:11 +02:00
|
|
|
touch config.json db.sqlite
|
|
|
|
mkdir user_locale
|
2019-08-06 01:12:05 +02:00
|
|
|
```
|
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. Build docker image and launch interactive setup in one step
|
|
|
|
```
|
2019-09-25 14:38:16 +02:00
|
|
|
docker-compose build
|
2019-09-24 11:46:11 +02:00
|
|
|
docker-compose run --rm gancio gancio setup --docker --db=sqlite
|
|
|
|
```
|
|
|
|
</div>
|
|
|
|
|
|
|
|
## Use postgreSQL
|
|
|
|
<div class='code-example bg-grey-lt-100' markdown="1">
|
|
|
|
|
|
|
|
1. **Download docker-compose.yml and Dockerfile**
|
2019-08-06 01:12:05 +02:00
|
|
|
```bash
|
2019-09-25 14:38:16 +02:00
|
|
|
wget https://gancio.org/docker/Dockerfile
|
2019-09-26 17:02:09 +02:00
|
|
|
wget https://gancio.org/docker/postgres/docker-compose.yml
|
2019-08-06 01:12:05 +02:00
|
|
|
```
|
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. Create an empty configuration (**this is needed**)
|
2019-07-17 00:41:08 +02:00
|
|
|
```
|
2019-09-24 11:46:11 +02:00
|
|
|
touch config.json
|
|
|
|
mkdir user_locale
|
2019-07-17 00:41:08 +02:00
|
|
|
```
|
2019-08-06 01:12:05 +02:00
|
|
|
|
2019-07-17 00:41:08 +02:00
|
|
|
1. Build docker image and launch interactive setup in one step
|
|
|
|
```
|
2019-09-25 14:38:16 +02:00
|
|
|
docker-compose build
|
2019-09-25 19:09:15 +02:00
|
|
|
docker-compose run --rm gancio gancio setup --docker --db=postgres
|
2019-07-17 00:41:08 +02:00
|
|
|
```
|
2019-09-24 11:46:11 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
## Start gancio
|
2019-07-17 00:41:08 +02:00
|
|
|
|
|
|
|
1. Run your container
|
|
|
|
```bash
|
|
|
|
docker-compose up -d
|
|
|
|
```
|
|
|
|
|
2019-09-24 11:46:11 +02:00
|
|
|
1. Look at logs with
|
|
|
|
```bash
|
|
|
|
docker-compose logs
|
|
|
|
```
|
|
|
|
|
2019-08-06 01:12:05 +02:00
|
|
|
1. [Setup nginx as a proxy](/install/nginx)
|
2019-07-17 00:41:08 +02:00
|
|
|
|
2019-07-27 13:04:06 +02:00
|
|
|
1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you specified during setup and enjoy :tada:
|
2019-08-06 01:12:05 +02:00
|
|
|
|
2019-08-31 22:14:37 +02:00
|
|
|
1. You can edit `config.json` file and restart the container on your needs, see [Configuration](/config) for more details.
|
2019-09-26 16:56:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Upgrade
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cd /opt/gancio
|
|
|
|
docker-compose up -d --no-deps --build
|
|
|
|
```
|