-
Notifications
You must be signed in to change notification settings - Fork 25
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 #60 from pinceladasdaweb/development
Development
- Loading branch information
Showing
10 changed files
with
2,415 additions
and
4,330 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 |
---|---|---|
@@ -1,28 +1,23 @@ | ||
FROM node:16.14.0-alpine | ||
FROM node:16.17.0-alpine | ||
|
||
LABEL maintainer="Pedro Rogério" | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy source code | ||
COPY package*.json ./ | ||
COPY --chown=node:node package*.json ./ | ||
|
||
# Running npm install | ||
RUN npm install --only=production | ||
RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force | ||
|
||
# Copy the rest of your app's source code from your host to your image filesystem. | ||
COPY . . | ||
COPY --chown=node:node . . | ||
|
||
# Create a user group 'nodegroup', create a user 'nodeuser' under 'nodegroup' and chown all the files to the app user. | ||
RUN addgroup -S nodegroup && \ | ||
adduser -S -D -h /usr/src/app nodeuser nodegroup && \ | ||
chown -R nodeuser:nodegroup /usr/src | ||
|
||
# Switch to 'nodeuser' | ||
USER nodeuser | ||
# Switch to 'node' user | ||
USER node | ||
|
||
# Open the mapped port | ||
EXPOSE 3000 | ||
|
||
CMD [ "node", "src/index.js" ] | ||
CMD ["node", "src/index.js"] |
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
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
Oops, something went wrong.