-
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.
* Erstatter docker/build-push-action@v4 med nais/docker-build-push@v0
- Loading branch information
1 parent
6b699bd
commit 983cc34
Showing
23 changed files
with
392 additions
and
1,002 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,18 @@ | ||
FROM node:18 AS builder | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY schema /usr/src/app/schema | ||
COPY package*.json codegen.yml .npmrc /usr/src/app/ | ||
RUN --mount=type=secret,id=NODE_AUTH_TOKEN \ | ||
NODE_AUTH_TOKEN=$(cat /run/secrets/NODE_AUTH_TOKEN) \ | ||
npm ci --prefer-offline --no-audit | ||
|
||
COPY . /usr/src/app | ||
|
||
ARG SENTRY_RELEASE | ||
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \ | ||
SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) \ | ||
npm run build && npm prune --production | ||
|
||
FROM node:18-alpine AS runtime | ||
|
||
WORKDIR /usr/src/app | ||
|
||
ENV PORT=3000 \ | ||
NODE_ENV=production | ||
NODE_ENV=production \ | ||
TZ=Europe/Oslo | ||
|
||
COPY --from=builder /usr/src/app/ /usr/src/app/ | ||
COPY next.config.js ./ | ||
COPY public ./public | ||
COPY .next/standalone ./ | ||
COPY .next/static ./.next/static | ||
|
||
EXPOSE 3000 | ||
USER node | ||
|
||
CMD ["./node_modules/.bin/next", "start"] | ||
CMD ["node", "server.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
Oops, something went wrong.