2020-10-01 12:14:25 +02:00
|
|
|
# Gancio
|
|
|
|
https://gancio.org
|
|
|
|
|
|
|
|
## Initial setup
|
|
|
|
https://gancio.org/install/docker
|
|
|
|
|
|
|
|
**You do not need to clone the full repo as we distribute gancio via npm.**
|
|
|
|
A Dockerfile and a docker-compose.yml are the only files needed.
|
|
|
|
|
|
|
|
- **Create a directory where everything related to gancio is stored (db, images, config)**
|
|
|
|
|
2020-10-01 12:22:22 +02:00
|
|
|
mkdir /opt/gancio
|
|
|
|
cd /opt/gancio
|
2020-10-01 12:14:25 +02:00
|
|
|
|
|
|
|
note that you can choose a different directory.
|
|
|
|
|
|
|
|
|
|
|
|
## Use postgreSQL
|
|
|
|
1. **Download docker-compose.yml and Dockerfile**
|
|
|
|
|
2020-10-01 12:22:22 +02:00
|
|
|
wget https://gancio.org/docker/Dockerfile
|
|
|
|
wget https://git.lattuga.net/blat/gancio_campiinrete/src/master/docker-compose.yml
|
2020-10-01 12:14:25 +02:00
|
|
|
|
2020-10-01 12:22:22 +02:00
|
|
|
2. Create an empty configuration (**this is needed**)
|
2020-10-01 12:14:25 +02:00
|
|
|
|
2020-10-01 12:22:22 +02:00
|
|
|
touch config.json
|
|
|
|
mkdir user_locale
|
2020-10-01 12:14:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Gandi
|
2020-10-01 12:22:22 +02:00
|
|
|
La risposta di gandi su come generare certificati SSL con Let's Encrypt
|
|
|
|
> It is not possible to perform a DNS check via the Certbot client, you
|
|
|
|
> have to go through a check via your web server (apache or nginx).
|
|
|
|
>
|
|
|
|
> The other solution is to use the acme.sh client which allows you to
|
|
|
|
> create Let's Encrypt SSL certificates using our API and LiveDNS :
|
|
|
|
> https://github.com/Neilpang/acme.sh
|
2020-10-01 12:14:25 +02:00
|
|
|
> https://github.com/Neilpang/acme.sh/wiki/dnsapi#18-use-gandi-livedns-api
|
|
|
|
|
|
|
|
|
|
|
|
## Letsproxy
|
|
|
|
https://github.com/Neilpang/letsproxy
|
|
|
|
|
|
|
|
aggiunti nel docker.compose.yml
|
2020-10-01 12:18:53 +02:00
|
|
|
- l'APIkey di gandi nell'environment di letsproxy
|
2020-10-01 12:22:22 +02:00
|
|
|
|
|
|
|
GANDI_LIVEDNS_KEY=
|
|
|
|
|
2020-10-01 12:18:53 +02:00
|
|
|
- le conf nell'environment di gancio
|
2020-10-01 12:22:22 +02:00
|
|
|
|
|
|
|
VIRTUAL_HOST=www.campiinrete.org
|
|
|
|
ENABLE_ACME=true
|
2020-10-01 12:14:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Start gancio
|
2020-10-01 12:18:53 +02:00
|
|
|
1. Create network
|
2020-10-01 12:22:22 +02:00
|
|
|
|
|
|
|
docker network create gancio_network
|
2020-10-01 12:14:25 +02:00
|
|
|
|
2020-10-01 12:18:53 +02:00
|
|
|
2. Run your container
|
2020-10-01 12:22:22 +02:00
|
|
|
|
|
|
|
docker-compose up -d
|
2020-10-01 12:14:25 +02:00
|
|
|
|
2020-10-01 12:18:53 +02:00
|
|
|
3. Look at logs with
|
2020-10-01 12:22:22 +02:00
|
|
|
|
|
|
|
docker-compose logs -f
|
2020-10-01 12:14:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Test ssl
|
|
|
|
questo non serve l'abbiamo usato per testare che riuscisse a creare i certificati con l'APIkey di gandi
|
|
|
|
docker exec -ti gancio_letsproxy_1 /bin/bash /acme.sh/acme.sh --issue --dns dns_gandi_livedns -d campiinrete.org -d www.campiinrete.org
|