-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from Veinar/main
- Loading branch information
Showing
4 changed files
with
47 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Use the NODE_VERSION argument to specify the Node.js version | ||
ARG NODE_VERSION=20 | ||
|
||
# Use the specified Node.js version as the base image | ||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Set Node args (do not set in node version 16 and below) | ||
ENV NODE_OPTIONS=--openssl-legacy-provider | ||
|
||
RUN apk add --update autoconf automake build-base libtool nasm pkgconf && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
# Setup work directory | ||
WORKDIR /gitops-website | ||
|
||
# Set permissions for non-root user | ||
RUN chown -R node:node /gitops-website | ||
|
||
# Switch user to non-root | ||
USER node | ||
|
||
# Add repo files with correct user:group ownership | ||
ADD --chown=node:node . . | ||
|
||
# Install dependencies | ||
RUN npm ci | ||
|
||
# Expose port for server | ||
EXPOSE 8000 | ||
|
||
# Create entrypoint | ||
ENTRYPOINT ["npm", "start"] |
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