-
Notifications
You must be signed in to change notification settings - Fork 6
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
2 changed files
with
19 additions
and
20 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 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,18 +1,11 @@ | ||
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal AS production | ||
# Use an official Nginx runtime as a parent image | ||
FROM registry.redhat.io/rhel9/nginx-120@sha256:612b6b8f0e58a80b31b820d04798ba1ebb1f06f121ed06b11f7ddc00ecd91502 | ||
|
||
WORKDIR app_home | ||
# Copy the dist folder to the Nginx html directory | ||
COPY dist /usr/share/nginx/html | ||
|
||
COPY . . | ||
|
||
# Create .cache directories | ||
USER root | ||
# Expose port 80 to the outside world | ||
EXPOSE 80 | ||
|
||
RUN npm install | ||
|
||
# Expose the port the app will run on | ||
USER 1001 | ||
|
||
EXPOSE 3000 | ||
|
||
# Start the application | ||
CMD /bin/sh -c "npm run build && npm start" | ||
# Command to run Nginx | ||
CMD ["nginx", "-g", "daemon off;"] |