gancio-upstream/docs/install/docker.md
2021-06-04 15:52:35 +02:00

2.5 KiB

layout title permalink parent nav_order
default Docker /install/docker Install 2

Docker installation

{: .no_toc }

  1. TOC {:toc}

Initial setup

info "Clone not needed" You do not need to clone the full repo, a Dockerfile and a docker-compose.yml are enough.

  • Create a directory where everything related to gancio is stored
mkdir -p /opt/gancio/data
cd /opt/gancio

Use sqlite

1. **Download docker-compose.yml and Dockerfile** ```bash wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml ```
  1. Build docker image and launch interactive setup
docker-compose build
docker-compose run --rm gancio gancio setup --docker --db=sqlite

Use postgreSQL

  1. Download docker-compose.yml and Dockerfile
wget https://gancio.org/docker/Dockerfile
wget https://gancio.org/docker/postgres/docker-compose.yml
  1. Build docker image and launch interactive setup
docker-compose build
docker-compose run --rm gancio gancio setup --docker --db=postgres

Start gancio

  1. Run your container
docker-compose up -d
  1. Look at logs
tail -f  data/logs/gancio.log
  1. Setup nginx as a proxy

  2. Point your web browser to http://localhost:13120 or where you specified during setup and enjoy 🎉

  3. Edit data/config.json and restart the container on your needs, see Configuration for more details.

Upgrade

warning "Backup your data" Backup your data is generally a good thing to do and this is especially true before upgrading. Don't be lazy and backup your data!

error "Upgrade from a version < 1.0" Since v1.0 our docker setup is changed and a new container has to be built:

  1. cd /opt/gancio
  2. Backup your data
  3. Download new Dockerfile
    wget https://gancio.org/docker/Dockerfile
  4. Download new docker-compose.yml (substitute <DB> to sqlite or postgres):
    wget https://gancio.org/docker/<DB>/docker-compose.yml
  5. Build the new container docker-compose build
  6. Extract your backup into ./data
    mkdir data; tar xvzf gancio-<yourLastBackup>-backup.tgz -C data
  7. Stop your old container docker-compose stop
  8. Start your new container docker-compose up
cd /opt/gancio
docker-compose up -d --no-deps --build