generated from Amsterdam/frontend-react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #257 from Amsterdam/improve--make-requirements
improved make requirements by adding a docker update
- Loading branch information
Showing
3 changed files
with
25 additions
and
6 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 |
---|---|---|
|
@@ -19,8 +19,12 @@ RUN git config --global url."https://github.com/".insteadOf [email protected]: | |
RUN npm --production=false --unsafe-perm ci && \ | ||
npm cache clean --force | ||
|
||
RUN chown -R node:node /app | ||
USER node | ||
# Upgrade dependencies | ||
FROM builder AS upgrade | ||
# install dependencies | ||
RUN npm ci | ||
RUN npm install -g npm-check-updates | ||
CMD ["ncu", "-u", "--doctor", "--target minor"] | ||
|
||
# Test | ||
FROM builder as test | ||
|
@@ -29,11 +33,15 @@ RUN npm run test | |
|
||
# Build | ||
FROM builder as build | ||
|
||
RUN chown -R node:node /app | ||
USER node | ||
|
||
RUN echo "run build" | ||
RUN GENERATE_SOURCEMAP=false npm run build | ||
|
||
# Deploy | ||
FROM nginxinc/nginx-unprivileged:mainline-alpine-slim | ||
COPY --from=build /app/build/. /var/www/html/ | ||
|
||
COPY default.conf /etc/nginx/conf.d/ | ||
COPY default.conf /etc/nginx/conf.d/ |
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