add docker compose
This commit is contained in:
20
frontend/Dockerfile
Normal file
20
frontend/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM node:20.19-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ARG VITE_API_URL
|
||||
ENV VITE_API_URL=$VITE_API_URL
|
||||
|
||||
COPY frontend/package.json frontend/package-lock.json /app/
|
||||
RUN npm install
|
||||
|
||||
COPY frontend/ .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:latest
|
||||
|
||||
COPY --from=build /app/dist /srv/www/frontend
|
||||
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
Reference in New Issue
Block a user