Fixes taken from the repo issues to enable building the frontend and the last known compatible flower version
36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
# Stage 0, "build-stage", based on Node.js, to build and compile the frontend
|
|
FROM node:16 as build-stage-1
|
|
|
|
# I dont know, it this installation required for you, you might delete them
|
|
RUN apt-get update && apt-get install -y wget --no-install-recommends \
|
|
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
|
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
|
&& apt-get update \
|
|
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& apt-get purge --auto-remove -y curl \
|
|
&& rm -rf /src/*.deb
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./ /app/
|
|
|
|
RUN npm install
|
|
|
|
ARG FRONTEND_ENV=production
|
|
|
|
ENV VUE_APP_ENV=${FRONTEND_ENV}
|
|
|
|
# Comment out the next line to disable tests
|
|
RUN npm run test:unit
|
|
|
|
RUN npm run build
|
|
|
|
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
|
|
FROM nginx:1.15
|
|
|
|
COPY --from=build-stage-1 /app/dist/ /usr/share/nginx/html
|
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf
|