Nils Beyer
7f6b4c2e08
All checks were successful
Java CI with Maven / build (push) Successful in 48s
24 lines
532 B
Docker
24 lines
532 B
Docker
### STAGE 1: Build ###
|
|
FROM node:18.17.1 AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build --prod
|
|
|
|
### STAGE 2: Deploy ###
|
|
FROM nginx:latest
|
|
RUN apt-get update
|
|
RUN apt-get upgrade -y
|
|
RUN apt-get install iputils-ping -y
|
|
COPY --from=build /app/dist/frontend /usr/share/nginx/html
|
|
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
|
COPY docker-entrypoint.sh /app-entrypoint.sh
|
|
|
|
RUN chmod +x /app-entrypoint.sh
|
|
|
|
ENTRYPOINT [ "/app-entrypoint.sh" ]
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|