forked from tdwg/rs.tdwg.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (19 loc) · 806 Bytes
/
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
FROM basex/basexhttp:9.1
LABEL maintainer="mblissett@gbif.org"
USER root
RUN apk update && apk add --no-cache python3 py3-requests supervisor varnish shadow
# Use a different directory for BaseX, because the /srv directory is declared a non-persistent volume.
RUN cp -pr /srv /basex
RUN usermod -d /basex basex
WORKDIR /basex
# BaseX script
COPY html/restxq.xqm /basex/basex/webapp
# Initialize the database (sets password, starts up, imports data, shuts down)
COPY . /usr/src/rs.tdwg.org
USER basex
RUN /usr/src/rs.tdwg.org/docker/initialize-database.sh ../ '' http://localhost:8984/rest/
USER root
RUN rm -Rf /usr/src/rs.tdwg.org
COPY docker/supervisord.conf /etc/supervisord.conf
COPY docker/varnish_default.vcl /etc/varnish/default.vcl
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]