-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 973 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
26
27
28
29
30
31
32
33
34
35
36
FROM node:14.16.1-alpine
LABEL maintainer="[email protected]"
RUN apk update && apk upgrade && apk add --no-cache bash git openssh
ENV MU_SPARQL_ENDPOINT 'http://database:8890/sparql'
ENV MU_APPLICATION_GRAPH 'http://mu.semte.ch/application'
ENV NODE_ENV 'production'
ENV LOG_SPARQL_ALL 'true'
ENV DEBUG_AUTH_HEADERS 'true'
WORKDIR /usr/src/app
COPY package.json /usr/src/app/package.json
COPY ./scripts /app/scripts
RUN npm config set unsafe-perm true && npm install
COPY . /usr/src/app
RUN chmod +x /usr/src/app/run-development.sh
RUN chmod +x /usr/src/app/build-production.sh
EXPOSE 80
CMD sh boot.sh
# This stuff only runs when building an image from the template
ONBUILD RUN rm -Rf /app/scripts
ONBUILD ADD . /app/
ONBUILD RUN /usr/src/app/build-production.sh
ONBUILD RUN if [ -f /app/on-build.sh ]; \
then \
echo "Running custom on-build.sh of child" \
&& chmod +x /app/on-build.sh \
&& /bin/bash /app/on-build.sh ;\
fi