picobello bv

This commit is contained in:
Dennis Postma 2024-07-10 20:58:53 +02:00
parent 85f15e5a01
commit 27a1edd71f
2 changed files with 29 additions and 8 deletions

28
Dockerfile Normal file
View File

@ -0,0 +1,28 @@
# Build stage
FROM node:14 as build-stage
WORKDIR /app
# Copy package.json and package-lock.json (if available)
COPY package*.json ./
# Install project dependencies
RUN npm install
# Copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# Build app for production with minification
RUN npm run build-ntc
# Production stage
FROM nginx:stable-alpine as production-stage
# Copy built assets from build-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx and keep it running in the foreground
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,11 +1,4 @@
{
"schemaVersion": 2,
"dockerfileLines": [
"FROM node:22.4.1-alpine",
"RUN mkdir -p /usr/src/app",
"WORKDIR /usr/src/app",
"COPY ./ /usr/src/app",
"RUN npm install && npm cache clean --force && npm run build-ntc",
"CMD [ \"npm\", \"start\" ]"
]
"dockerfilePath" :"./Dockerfile"
}