feat: add nyanimedb-frontend Dockerfile
This commit is contained in:
parent
1c24a95db6
commit
6612ed6df6
1 changed files with 13 additions and 0 deletions
13
Dockerfiles/Dockerfile_frontend
Normal file
13
Dockerfiles/Dockerfile_frontend
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM node:20-alpine AS builder
|
||||
ARG VITE_BACKEND_API_BASE_URL
|
||||
ENV VITE_BACKEND_API_BASE_URL=$VITE_BACKEND_API_BASE_URL
|
||||
WORKDIR /app
|
||||
COPY modules/frontend/ ./
|
||||
RUN echo "VITE_BACKEND_API_BASE_URL=$VITE_BACKEND_API_BASE_URL"
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue