From 2e4456a3380f96d7cc9ecd273e8a7a7b99cc9bbb Mon Sep 17 00:00:00 2001 From: Daoud Clarke Date: Thu, 12 Oct 2023 20:52:51 +0100 Subject: [PATCH] Build the front end --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5163e67..9feffec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,10 @@ +FROM node:hydrogen-bullseye as front-end + +COPY front-end /front-end +WORKDIR /front-end +RUN npm install && npm run build + + FROM python:3.10.2-bullseye as base ENV PYTHONFAULTHANDLER=1 \ @@ -39,6 +46,9 @@ RUN apt-get update && apt-get install -y postgresql-client # Copy only the required /venv directory from the builder image that contains mwmbl and its dependencies COPY --from=builder /venv /venv +# Copy the front end build +COPY --from=front-end /front-end/dist /app/static + ADD nginx.conf.sigil /app # Set up a volume where the data will live