2.6 KiB
2.6 KiB
layout, title, permalink, parent, nav_order
| layout | title | permalink | parent | nav_order |
|---|---|---|---|---|
| default | Docker | /install/docker | Install | 2 |
Docker installation
{: .no_toc }
- TOC {:toc}
Initial setup
info "Clone not needed" You do not need to clone the full repo, a
Dockerfileand adocker-compose.ymlare 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 {{site.url}}{% link /docker/Dockerfile %}
wget {{site.url}}{% link /docker/sqlite/docker-compose.yml %}
```
- Build docker image and launch interactive setup
docker-compose build
docker-compose run --rm gancio gancio setup --docker --db=sqlite
Use postgreSQL
- Download docker-compose.yml and Dockerfile
wget {{site.url}}{% link /docker/Dockerfile %}
wget {{site.url}}{% link /docker/postgres/docker-compose.yml %}
- Build docker image and launch interactive setup
docker-compose build
docker-compose run --rm gancio gancio setup --docker --db=postgres
Start gancio
- Run your container
docker-compose up -d
- Look at logs
tail -f data/logs/gancio.log
-
Point your web browser to http://localhost:13120 or where you specified during setup and enjoy 🎉
-
Edit
data/config.jsonand restart the container on your needs, see [Configuration]({% link install/configuration.md %}) 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]({% link install/backup.md %}) 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:
cd /opt/gancio- [Backup your data]({% link install/backup.md %})
- Download new
Dockerfile
wget {{site.url}}{% link /docker/Dockerfile %}- Download new
docker-compose.yml(substitutesqlitetopostgresin case):wget {{site.url}}{% link /docker/sqlite/docker-compose.yml %}- Build the new container
docker-compose build- Extract your backup into
./datamkdir data; tar xvzf gancio-<yourLastBackup>-backup.tgz -C data- Stop your old container
docker-compose stop- Start your new container
docker-compose up
cd /opt/gancio
docker-compose up -d --no-deps --build