Skip to content

Commit e3741b6

Browse files
testing external directory for branch 2021.02.xx (#7468)
* checked externalisation * removed tested config * remove externalization * Update Dockerfile Co-authored-by: Alessandro Parma <alessa.parma@gmail.com>
1 parent 130ed65 commit e3741b6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ RUN if [ "$TOMCAT_EXTRAS" = false ]; then \
1414
# Add war files to be deployed
1515
COPY docker/*.war "${CATALINA_BASE}/webapps/"
1616

17+
#name of the external dir
18+
ENV DATA_DIR="/data"
19+
RUN mkdir -p ${DATA_DIR}/configs
20+
#add all files you want to copy to the external dir
21+
# COPY newext.json /data/configs/new.json
22+
1723
# Geostore externalization template. Disabled by default
1824
COPY docker/geostore-datasource-ovr.properties "${CATALINA_BASE}/conf/"
1925
ARG GEOSTORE_OVR_OPT=""
20-
ENV JAVA_OPTS="${JAVA_OPTS} ${GEOSTORE_OVR_OPT}"
26+
ENV JAVA_OPTS="${JAVA_OPTS} ${GEOSTORE_OVR_OPT} -Ddatadir.location=${DATA_DIR}"
2127

2228
# Set variable to better handle terminal commands
2329
ENV TERM xterm
30+
VOLUME [ "${DATA_DIR}" ]
2431

2532
EXPOSE 8080

0 commit comments

Comments
 (0)