picobello bv
This commit is contained in:
parent
85f15e5a01
commit
27a1edd71f
28
Dockerfile
Normal file
28
Dockerfile
Normal 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;"]
|
@ -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"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user