Mercurial > gemma
annotate docker/Dockerfile.backend @ 2130:f3aabc05f9b2
Fix constraints on waterway profiles
staging_done in the UNIQUE constraint had no effect, because the
exclusion constraint prevented two rows with equal location and
validity anyhow. Adding staging_done to the exclusion constraint
makes the UNIQUE constraint checking only a corner case of what
the exclusion constraint checks. Thus, remove the UNIQUE constraint.
Casting staging_done to int is needed because there is no appropriate
operator class for booleans. Casting to smallint or even bit would have
been better (i.e. should result in smaller index size), but that would
have required creating such a CAST, in addition.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 06 Feb 2019 15:42:32 +0100 |
parents | 5d9e0adf73d1 |
children | 153c77e529dc |
rev | line source |
---|---|
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 FROM ubuntu:bionic |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 LABEL authors="tom.gottfried@intevation.de" |
1356
ce24990b3d5c
add licensing hint to docker files
Bernhard Reiter <bernhard@intevation.de>
parents:
561
diff
changeset
|
3 LABEL description="Contains software from gemma, for right holders and\ |
ce24990b3d5c
add licensing hint to docker files
Bernhard Reiter <bernhard@intevation.de>
parents:
561
diff
changeset
|
4 licensing infos, see https://hg.intevation.de/gemma ." |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
458
diff
changeset
|
6 RUN sed -i 's/\(deb.*\)$/\1 universe/' /etc/apt/sources.list |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 RUN apt-get update &&\ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 apt-get -y install --no-install-recommends \ |
1584
5d9e0adf73d1
Docker backend: No need to install gorilla context from distro.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1578
diff
changeset
|
10 make git golang-go \ |
1578 | 11 ca-certificates |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 WORKDIR /opt/gemma |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 # Copy only backend stuff |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 COPY 3rdpartylibs.sh ./ |
414
c1047fd04a3a
Moved project specific Go packages to new pkg folder.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
402
diff
changeset
|
17 COPY pkg ./pkg/ |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
18 COPY cmd ./cmd/ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
19 COPY Makefile ./ |
318
1a2dfd9351e9
Add example configuration and use it in dockerised backend
Tom Gottfried <tom@intevation.de>
parents:
309
diff
changeset
|
20 COPY example_conf.toml ./ |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
360
diff
changeset
|
22 RUN make install |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
23 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 EXPOSE 8000 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
25 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
360
diff
changeset
|
26 CMD ["/usr/local/bin/gemma", "-c", "/opt/gemma/example_conf.toml"] |