Add config path environment to Docker image
Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
This commit is contained in:
parent
d79a28d44a
commit
92b0b9e1db
|
@ -40,6 +40,7 @@ ENV HOME=/home/bot
|
|||
|
||||
EXPOSE 3000
|
||||
ENV GIN_MODE "release"
|
||||
ENV GITEA_SQ_BOT_CONFIG_PATH "/home/bot/config/config.yaml"
|
||||
|
||||
VOLUME ["/home/bot/config/"]
|
||||
RUN ["chmod", "+x", "/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
|
13
README.md
13
README.md
|
@ -61,6 +61,19 @@ and execute the following (replace `$TAG` first):
|
|||
docker run --rm -it -p 9000:3000 -v "$(pwd)/config/:/home/bot/config/" justusbunsi/gitea-sonarqube-bot:$TAG
|
||||
```
|
||||
|
||||
**Starting with v0.2.0**
|
||||
|
||||
By default, the bot expects its configuration file under `./config/config.yaml` next to the bot executable. Inside the Docker image the
|
||||
corresponding full path is `/home/bot/config/config.yaml`. If you prefer using a different location or even a different filename, you can
|
||||
also define the environment variable `GITEA_SQ_BOT_CONFIG_PATH` that allows for changing that full path.
|
||||
|
||||
Imagine having a `./config/sqbot.config.yml` on your host that you want to populate inside `/mnt/`, the correct command to run a Docker
|
||||
container would be:
|
||||
|
||||
```bash
|
||||
docker run --rm -it -p 9000:3000 -e "GITEA_SQ_BOT_CONFIG_PATH=/mnt/sqbot.config.yml" -v "$(pwd)/config/:/mnt/" justusbunsi/gitea-sonarqube-bot:$TAG
|
||||
```
|
||||
|
||||
### Helm Chart
|
||||
|
||||
See [Helm Chart README](helm/README.md) for detailed instructions.
|
||||
|
|
Loading…
Reference in a new issue