You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
502 B
Docker
37 lines
502 B
Docker
# syntax=docker/dockerfile:1.4
|
|
|
|
FROM node:lts AS development
|
|
|
|
WORKDIR /frontend
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 8090
|
|
|
|
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "8090"]
|
|
|
|
FROM node:lts AS build
|
|
|
|
WORKDIR /frontend
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine AS production
|
|
|
|
COPY --from=build /frontend/dist /usr/share/nginx/html
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 8090
|
|
|
|
CMD ["nginx", "-g", "daemon off;"] |