ci: Frontend routing

This commit is contained in:
Tibo De Peuter 2025-03-11 13:50:55 +01:00
parent edccf4ef62
commit 0053279dc3
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
11 changed files with 248 additions and 960 deletions

35
frontend/Dockerfile Normal file
View file

@ -0,0 +1,35 @@
FROM node:22 AS build-stage
# install simple http server for serving static content
RUN npm install -g http-server
WORKDIR /app
# Install dependencies
COPY package*.json ./
COPY ./frontend/package.json ./frontend/
RUN npm install --silent
# Build the frontend
# Root tsconfig.json
COPY tsconfig.json ./
COPY assets ./assets/
WORKDIR /app/frontend
COPY frontend ./
RUN npm run build
FROM nginx:stable AS production-stage
COPY config/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=build-stage /app/frontend/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]