stash
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
j3d1 2024-04-04 22:47:35 +02:00
parent f8dacef309
commit 37350f59c3
3 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,15 @@
# Use an official Node.js runtime as instance_a parent image
FROM node:14
# Set work directory
WORKDIR /app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
COPY package.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
CMD [ "npm", "run", "dev", "--", "--host"]

View file

@ -0,0 +1,14 @@
ROM node:alpine as builder
WORKDIR /app
COPY ./package.json /app/package.json
COPY . /app
RUN npm ci --only=production
RUN npm run build
FROM nginx:alpine as runner
#RUN apk add --update npm
WORKDIR /app
COPY --from=builder /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
EXPOSE 80