Mercurial > gemma
changeset 402:20d2edbc863d
Add install target for backend and use in Dockerfile
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 14 Aug 2018 19:37:36 +0200 |
parents | 746d8c9c35f4 |
children | 46a80016293c |
files | Dockerfile Makefile |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Dockerfile Tue Aug 14 14:45:34 2018 +0200 +++ b/Dockerfile Tue Aug 14 19:37:36 2018 +0200 @@ -19,17 +19,13 @@ COPY Makefile ./ COPY example_conf.toml ./ -RUN make gemma && mkdir /opt/bin && mv cmd/gemma/gemma /opt/bin/ +RUN make install EXPOSE 8000 -CMD ["/opt/bin/gemma", "-c", "/opt/gemma/example_conf.toml"] +CMD ["/usr/local/bin/gemma", "-c", "/opt/gemma/example_conf.toml"] # Run with e.g. # docker build -t gemma_backend . # docker run --name gemma_backend -v $PWD:/opt/gemma -d -p 8200:8000 \ # --link your_gemma_db:gemma_db gemma_backend -# -# To rebuild inside the container: -# ln -sf /opt/gemma/cmd/gemma/gemma /opt/bin/gemma -# make gemma
--- a/Makefile Tue Aug 14 14:45:34 2018 +0200 +++ b/Makefile Tue Aug 14 19:37:36 2018 +0200 @@ -8,6 +8,7 @@ GOPATH := $(BUILDBASE)/go GOCACHE := $(BUILDBASE)/gocache ENVWARPPER := $(BUILDBASE)/run-with-env.sh +BINDIR := /usr/local/bin export BUILDBASE @@ -42,6 +43,9 @@ client: $(MAKE) -f Makefile.build -C client +install: gemma + cp cmd/gemma/gemma $(BINDIR) + clean: $(MAKE) -f Makefile.build -C client $@ rm -f "$(gemma-bin)"