25 lines
378 B
Docker
25 lines
378 B
Docker
|
# syntax=docker/dockerfile:1
|
||
|
|
||
|
#
|
||
|
# Building phase
|
||
|
#
|
||
|
FROM node:19-bullseye AS builder
|
||
|
|
||
|
ARG VITE_BACKEND_URL=http://localhost:8080
|
||
|
|
||
|
ENV VITE_BACKEND_URL=$VITE_BACKEND_URL
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY . .
|
||
|
RUN npm install
|
||
|
RUN npm run build
|
||
|
|
||
|
#
|
||
|
# NGINX phase
|
||
|
#
|
||
|
FROM nginx:alpine
|
||
|
|
||
|
COPY --from=builder /app/dist/ /usr/share/nginx/html/
|
||
|
COPY ./conf.d/nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
|