Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Distroless image + docker config updater + PR build workflow #166

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/build-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build pull request

on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**.md'

jobs:
buildDev:
uses: navikt/aap-workflows/.github/workflows/frontend-next-only-build.yml@main
permissions:
contents: read
id-token: write
packages: write
secrets: inherit
with:
cluster: dev-gcp
15 changes: 15 additions & 0 deletions .github/workflows/update-dependabot-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Update dependabot config

on:
workflow_dispatch:
schedule:
- cron: '0 7 * * 3'

jobs:
checkForConfigUpdate:
uses: navikt/aap-workflows/.github/workflows/dependabot-frontend-next-config-updater.yml@main
permissions:
contents: write
id-token: write
packages: write
pull-requests: write
14 changes: 5 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
FROM node:20-alpine
FROM gcr.io/distroless/nodejs20-debian12@sha256:f912a7599e5338df6527a669def29bddc9469fdac9ab22c4cc9282c1b64c868b

ENV NODE_ENV production

RUN addgroup --system --gid 1069 nodejs
RUN adduser --system --uid 1069 nextjs

WORKDIR /app
COPY --chown=nextjs:nodejs .next/standalone ./
COPY --chown=nextjs:nodejs .next/static ./.next/static
COPY .next/standalone ./
COPY .next/static ./.next/static

USER nextjs
ENV NODE_ENV production

EXPOSE 3000

ENV PORT 3000

CMD ["node", "server.js"]
CMD ["server.js"]
Loading