fix images
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7be6856e25
commit
ea3b336541
@ -1,12 +1,22 @@
|
|||||||
# build stage
|
FROM node:lts-alpine
|
||||||
FROM node:lts-hydrogen AS build-stage
|
|
||||||
|
# install simple http server for serving static content
|
||||||
|
RUN npm install -g http-server
|
||||||
|
|
||||||
|
# make the 'app' folder the current working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy both 'package.json' and 'package-lock.json' (if available)
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# install project dependencies
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
# copy project files and folders to the current working directory (i.e. 'app' folder)
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# build app for production with minification
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:stable-alpine AS production-stage
|
EXPOSE 8080
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
CMD [ "http-server", "dist" ]
|
||||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
Loading…
Reference in new issue