comparison Dockerfile @ 318:1a2dfd9351e9

Add example configuration and use it in dockerised backend Besides the documenting effect of an example, using it in a docker container makes it easier to change configuration via a volume of the running container.
author Tom Gottfried <tom@intevation.de>
date Thu, 02 Aug 2018 12:48:59 +0200
parents 0d2bdec1e637
children 6d145ee0a097
comparison
equal deleted inserted replaced
317:5cb18bedb3a9 318:1a2dfd9351e9
14 COPY auth ./auth/ 14 COPY auth ./auth/
15 COPY cmd ./cmd/ 15 COPY cmd ./cmd/
16 COPY config ./config/ 16 COPY config ./config/
17 COPY controllers ./controllers/ 17 COPY controllers ./controllers/
18 COPY Makefile ./ 18 COPY Makefile ./
19 COPY example_conf.toml ./
19 20
20 RUN make gemma && mkdir /opt/bin && mv cmd/gemma/gemma /opt/bin/ 21 RUN make gemma && mkdir /opt/bin && mv cmd/gemma/gemma /opt/bin/
21 22
22 EXPOSE 8000 23 EXPOSE 8000
23 24
24 CMD ["/opt/bin/gemma",\ 25 CMD ["/opt/bin/gemma", "-c", "/opt/gemma/example_conf.toml"]
25 "-H", "gemma_db",\
26 "-o", "0.0.0.0",\
27 "-s", "/tmp/gemma_session.data",\
28 "-w", "./web"]
29 26
30 # Run with e.g. 27 # Run with e.g.
31 # docker build -t gemma_backend . 28 # docker build -t gemma_backend .
32 # docker run --name gemma_backend -v $PWD:/opt/gemma -d -p 8200:8000 \ 29 # docker run --name gemma_backend -v $PWD:/opt/gemma -d -p 8200:8000 \
33 # --link your_gemma_db:gemma_db gemma_backend 30 # --link your_gemma_db:gemma_db gemma_backend