aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2019-01-06 15:43:15 +0100
committerNoah Loomans <noahloomans@gmail.com>2019-01-06 15:43:15 +0100
commit2de76c4fa70eaf01ab0f1172dce0d0bb20331a37 (patch)
treeedfffcc47776a3f795e622c39e258acef7419481
parent1145c7ef325f1190e89c4684f180a26d3a74128b (diff)
Add SCHOOL=kiemm build option to Dockerfile
-rw-r--r--Dockerfile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 685085d..7604a86 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
FROM ubuntu
+ARG SCHOOL=metis
ARG SCHOOL_LEVEL=havo-vwo
RUN apt-get update
@@ -12,12 +13,20 @@ COPY . /var/www
WORKDIR /var/www
RUN npm install
-RUN if [ "$SCHOOL_LEVEL" = "mavo" ]; \
- then npm run build-mavo; \
- else npm run build; \
+RUN if [ "$SCHOOL" = "kiemm" ] ;\
+ then if [ "$SCHOOL_LEVEL" = "mavo" ] ;\
+ then npm run build-kiemm ;\
+ else echo "SCHOOL_LEVEL must be mavo is SCHOOL is kiemm" ;\
+ exit 1 ;\
+ fi ;\
+ else if [ "$SCHOOL_LEVEL" = "mavo" ] ;\
+ then npm run build-mavo ;\
+ else npm run build ;\
+ fi ;\
fi
ENV PORT=80
+ENV SCHOOL=$SCHOOL
ENV SCHOOL_LEVEL=$SCHOOL_LEVEL
EXPOSE 80