forked from enketo/enketo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (30 loc) · 1.33 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
# Builds and launches Enketo Express.
#
# Requirements for use:
# - A main Redis database instance
# - A cache Redis database instance
# - An OpenRosa form server
# - Configuration that at minimum indicates where to find the redis instances and form server
#
# You can configure Enketo Express using an orchestration tool like Docker Compose or Kubernetes or
# by adding additional build stages. There are several approaches to configuration:
# - set environment variables (see https://github.com/enketo/enketo/blob/main/packages/enketo-express/config/sample.env)
# - write a config.json file to ${ENKETO_SRC_DIR}/packages/enketo-express/config/config.json
# - write a template config.json file to the folder above and use python, envsubt, etc to fill in the template based on environment variables
#
# Note that adding new widgets or themes requires Enketo Express to be rebuilt.
FROM node:20.17.0-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
build-essential \
git \
gettext-base
ENV ENKETO_SRC_DIR=/srv/src/enketo
WORKDIR ${ENKETO_SRC_DIR}
COPY . ${ENKETO_SRC_DIR}
# Install and build, leaving dev dependencies (yarn 1 has no prune)
RUN yarn install --frozen-lockfile \
&& yarn cache clean
EXPOSE 8005
CMD ["yarn", "workspace", "enketo-express", "start"]