-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
18 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
#Serve the app with NGINX | ||
# Builder stage | ||
FROM node:18 AS builder | ||
|
||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm ci | ||
|
||
COPY . . | ||
RUN npm run build | ||
|
||
# Final stage (Nginx) | ||
FROM nginx:alpine | ||
|
||
# Copy the build files from the dist folder to /usr/share/nginx/html | ||
COPY build /usr/share/nginx/html | ||
COPY --from=builder /app/build /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
# Expose the desired port (default is 80 for NGINX) | ||
EXPOSE 3000 | ||
|
||
# Start NGINX | ||
CMD ["nginx", "-g", "daemon off;"] |