-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
76 lines (63 loc) · 3.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
ARG GEOMAPFISH_VERSION
ARG GEOMAPFISH_MAIN_MINOR_VERSION
FROM camptocamp/geomapfish-tools:${GEOMAPFISH_VERSION} as builder
ENV VARS_FILE=vars.yaml
ENV CONFIG_VARS sqlalchemy.url sqlalchemy.pool_recycle sqlalchemy.pool_size sqlalchemy.max_overflow \
sqlalchemy.executemany_mode sqlalchemy_slave.url sqlalchemy_slave.pool_recycle sqlalchemy_slave.pool_size \
sqlalchemy_slave.max_overflow sqlalchemy_slave.executemany_mode schema schema_static enable_admin_interface \
default_locale_name servers layers cache admin_interface getitfixed functionalities \
raster shortener hide_capabilities tinyowsproxy resourceproxy print_url print_get_redirect \
checker check_collector default_max_age package srid \
reset_password fulltextsearch global_headers headers authorized_referers hooks stats db_chooser \
dbsessions urllogin host_forward_host headers_whitelist headers_blacklist \
smtp c2c.base_path welcome_email \
lingua_extractor interfaces_config interfaces devserver_url api authentication intranet metrics pdfreport \
vector_tiles i18next
COPY . /tmp/config/
ARG SIMPLE
ENV SIMPLE=$SIMPLE
RUN build-l10n "geoserver_gmf"
ARG PGSCHEMA
ENV PGSCHEMA=$PGSCHEMA
RUN \
cd /tmp/config/geoportal/ && \
c2c-template --vars ${VARS_FILE} \
--get-config geoserver_gmf_geoportal/config.yaml \
${CONFIG_VARS} && \
pykwalify --data-file geoserver_gmf_geoportal/config.yaml \
--schema-file CONST_config-schema.yaml && \
rm CONST_* vars.yaml && \
qgisserver-plugin-config geoserver_gmf_geoportal/config.yaml ../qgisserver/geomapfish.yaml.tmpl
###############################################################################
FROM camptocamp/geomapfish-config:${GEOMAPFISH_MAIN_MINOR_VERSION} AS gmf_config
ARG PGSCHEMA
ENV PGSCHEMA=$PGSCHEMA
COPY --from=builder /tmp/config/ /tmp/config/
RUN \
if [ -e /tmp/config/mapserver ]; then mv /tmp/config/mapserver /etc/; fi && \
if [ -e /tmp/config/tilegeneration ]; then mv /tmp/config/tilegeneration /etc/; fi && \
if [ -e /tmp/config/qgisserver ]; then mv /tmp/config/qgisserver /etc/qgisserver; fi && \
if [ -e /tmp/config/haproxy ]; then mv /tmp/config/haproxy/* /etc/haproxy/; fi && \
mkdir --parent /usr/local/tomcat/webapps/ROOT/ && \
if [ -e /tmp/config/print ]; then mv /tmp/config/print/print-apps /usr/local/tomcat/webapps/ROOT/; fi && \
mv /tmp/config/geoportal/geoserver_gmf_geoportal/ /etc/geomapfish/ && \
mv /tmp/config/geoportal/* /etc/geomapfish/ || true && \
chmod g+w -R \
/etc/geomapfish \
/etc/mapserver \
/etc/qgisserver \
/etc/tilegeneration \
/usr/local/tomcat/webapps/ROOT/print-apps \
/etc/haproxy_dev \
/etc/haproxy && \
adduser www-data root && \
sed 's#bind :80#bind *:443 ssl crt /etc/haproxy_dev/localhost.pem#g' /etc/haproxy/haproxy.cfg.tmpl \
> /etc/haproxy_dev/haproxy.cfg.tmpl && \
echo ' http-request set-header X-Forwarded-Proto https' >> /etc/haproxy_dev/haproxy.cfg.tmpl
VOLUME /etc/geomapfish \
/etc/mapserver \
/etc/qgisserver \
/etc/tilegeneration \
/usr/local/tomcat/webapps/ROOT/print-apps \
/etc/haproxy_dev \
/etc/haproxy