feat: first MVP

This commit is contained in:
2025-03-13 10:26:23 +01:00
parent 2b1b46b67a
commit c37a570836
14 changed files with 419 additions and 13 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM node:18.19-alpine AS builder
WORKDIR /app-builder
COPY ./package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.25.1
WORKDIR /app
ARG VERSION=next
# NGINX redirect and cache control
RUN sed -i '8 a \ \ \ \ \ \ \ \ try_files $uri $uri /index.html;' /etc/nginx/conf.d/default.conf
# RUN sed -i "10 a \ \ \ \ \ \ \ \ location /env.js { add_header Cache-Control 'no-store'; add_header Cache-Control 'no-cache'; expires 0;}" /etc/nginx/conf.d/default.conf
# https://pumpingco.de/blog/environment-variables-angular-docker/
# RUN echo -n 'envsubst < /usr/share/nginx/html/env.template.js > /usr/share/nginx/html/env.js\nrm /usr/share/nginx/html/env.template.js' > /docker-entrypoint.d/100-set-env.sh && chmod +x /docker-entrypoint.d/100-set-env.sh
COPY --from=builder /app-builder/build /usr/share/nginx/html