mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 04:09:15 +02:00
27 lines
520 B
Docker
27 lines
520 B
Docker
# build stage
|
|
FROM node:lts-alpine AS build
|
|
|
|
WORKDIR /app
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# development stage
|
|
FROM node:lts-alpine AS dev
|
|
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . ./
|
|
|
|
# production stage
|
|
# https://hub.docker.com/r/bitnami/nginx -> always run as non-root user
|
|
FROM bitnami/nginx:1.25 AS prod
|
|
|
|
# copy build files from build container
|
|
COPY --from=build /app/dist /app
|
|
COPY ./frontend/nginx.conf /opt/bitnami/nginx/conf/nginx.conf
|
|
|
|
EXPOSE 8000
|