Skip to content

Commit

Permalink
Docker: Move configuration back to a dedicated folder to allow proper…
Browse files Browse the repository at this point in the history
… host mounting (fixes #34)
  • Loading branch information
stefanwichmann committed Apr 10, 2018
1 parent efbc1b3 commit 432783e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:latest
WORKDIR /opt/kelvin
VOLUME /opt/kelvin
VOLUME /etc/opt/kelvin

RUN apk --no-cache add ca-certificates tzdata && update-ca-certificates
COPY dist/kelvin-linux-amd64-v* /opt/kelvin/

ENTRYPOINT /opt/kelvin/kelvin -enableWebInterface 2>&1 | tee /var/log/kelvin.log
ENTRYPOINT /opt/kelvin/kelvin -enableWebInterface -configuration=/etc/opt/kelvin/config.json 2>&1 | tee /var/log/kelvin.log
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ As an alternative to manual installation you can also pull the official [docker
- Start a container via ```docker run -d -e TZ=Europe/Berlin -p 8080:8080 stefanwichmann/kelvin``` (replace Europe/Berlin with your local [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones))
- ```docker ps``` should now report your running container
- Run ```docker logs {CONTAINER_ID}``` to see the kelvin output (You can get the valid ID from ```docker ps```)
- To adjust the configuration you should use the web interface running at ```http://{DOCKER_HOST_IP}:8080/```. As an alternative log into your container via ```docker exec -it {CONTAINER_ID} /bin/sh``` and edit the file ```/opt/kelvin/config.json```. After changing the configuration you have to restart Kelvin through the web interface or by ```docker restart {CONTAINER_ID}```.
- To adjust the configuration you should use the web interface running at ```http://{DOCKER_HOST_IP}:8080/```.
- If you want to keep your configuration over the lifetime of your container, you can map the folder ```/etc/opt/kelvin/``` to your host filesystem. If you alter the configuration you have to restart Kelvin through the web interface or by running ```docker restart {CONTAINER_ID}```.

# Configuration
Kelvin will create it's configuration file `config.json` in the current directory and store all necessary information to operate in it. By default it is fully usable and looks like this:
Expand Down

0 comments on commit 432783e

Please sign in to comment.