2021-02-20 14:54:17 +00:00
# Gemini Agate Image
2022-11-30 20:52:48 +00:00
[![Build Status ](https://drone.valvin.fr/api/badges/valvin/gemini-agate-image/status.svg )](https://drone.valvin.fr/valvin/gemini-agate-image)
2021-02-20 21:56:11 +00:00
This image allowes to publish static content locate in a git repository on [Gemini ](https://gemini.circumlunar.space/ ). Based on [Agate ](https://github.com/mbrubeck/agate ) gemini server.
2021-02-20 20:47:59 +00:00
This images takes these environment variables:
| variable | description | default value |
2021-02-20 20:54:07 +00:00
| --- | --- | --- |
2021-02-20 20:47:59 +00:00
| `GEMINI_DOMAIN` | domain name of the capsule | example.com |
| `GEMINI_GIT_REPO` | url of the git repository containing content | `https://gitlab.com/valvin/gemini-agate-image` |
2021-02-20 20:54:07 +00:00
| `GEMINI_CONTENT_FOLDER` | folder inside the git repository which contains the content. it means you have `content` folder in your repo with default | `content` |
2022-09-18 19:17:59 +00:00
| `GEMINI_KILN_BUILD` | if set to `yes` `kiln build` will be execute after an update of the repository | `no` |
2022-09-18 12:54:50 +00:00
| `GEMINI_KILN_SRC` | used when kiln build is enabled. path inside de git repository where kiln `config.toml` is located | `.` |
2021-02-20 20:47:59 +00:00
| `GEMINI_GIT_PATH` | path in which git repository will be cloned | `/app/data` |
| `GEMINI_CERT_PATH` | path which contains certificates. this path has to be a volume if not new certs will be generated | `/certs` |
| `GEMINI_LANG` | langage of the content | `fr-FR` |
image take those commands:
* none or `run` : launch agate after initialization process
* `update` : update repository content
initialization process is:
* check if cert are present in `GEMINI_CERT_PATH` if not it creates it
* clone or update the content repository
* launch agate
2021-02-20 20:54:07 +00:00
docker command example:
2022-09-18 12:54:50 +00:00
* static files:
```
docker run --rm -it -e GEMINI_DOMAIN=mydomain.tld \
-e GEMINI_GIT_REPO=https://gitlab.com/valvin/gemini-agate-image \
-e GEMINI_CONTENT_FOLDER=content/static \
-v $(pwd)/certs:/certs -p 1965:1965 \
registry.gitlab.com/valvin/gemini-agate-image:latest
```
* kiln capsule:
2021-02-20 20:54:07 +00:00
```
docker run --rm -it -e GEMINI_DOMAIN=mydomain.tld \
-e GEMINI_GIT_REPO=https://gitlab.com/valvin/gemini-agate-image \
2022-09-18 12:54:50 +00:00
-e GEMINI_CONTENT_FOLDER=content/kiln/public \
-e GEMINI_KILN_BUILD=true \
-e GEMINI_KILN_SRC=content/kiln \
-v $(pwd)/certs:/certs -p 1965:1965 \
2021-02-20 20:54:07 +00:00
registry.gitlab.com/valvin/gemini-agate-image:latest
```