[fix] Build deps and flower version

Fixes taken from the repo issues to enable building the frontend and the last known compatible flower version
This commit is contained in:
Pablo Aramburo 2022-08-22 16:07:59 -06:00
parent 59adb23a90
commit 983ce03fc8
3 changed files with 27 additions and 9 deletions

View File

@ -112,7 +112,7 @@ services:
# You also have to change the flower command # You also have to change the flower command
flower: flower:
image: mher/flower image: mher/flower:0.9.7
networks: networks:
- ${TRAEFIK_PUBLIC_NETWORK?Variable not set} - ${TRAEFIK_PUBLIC_NETWORK?Variable not set}
- default - default

View File

@ -1,14 +1,23 @@
# Stage 0, "build-stage", based on Node.js, to build and compile the frontend # Stage 0, "build-stage", based on Node.js, to build and compile the frontend
FROM tiangolo/node-frontend:10 as build-stage 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 WORKDIR /app
COPY package*.json /app/ COPY ./ /app/
RUN npm install RUN npm install
COPY ./ /app/
ARG FRONTEND_ENV=production ARG FRONTEND_ENV=production
ENV VUE_APP_ENV=${FRONTEND_ENV} ENV VUE_APP_ENV=${FRONTEND_ENV}
@ -18,11 +27,9 @@ RUN npm run test:unit
RUN npm run build RUN npm run build
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx # Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.15 FROM nginx:1.15
COPY --from=build-stage /app/dist/ /usr/share/nginx/html COPY --from=build-stage-1 /app/dist/ /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /nginx.conf /etc/nginx/conf.d/default.conf
COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf

11
frontend/nginx.conf Normal file
View File

@ -0,0 +1,11 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
include /etc/nginx/extra-conf.d/*.conf;
}