Skip to content
Open
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
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["public", "**.snap", "coverage"],
"ignorePaths": ["public", "**.snap", "coverage", "pnpm-lock.yaml"],
"dictionaryDefinitions": [],
"dictionaries": ["en-gb", "html", "fullstack", "css"],
"words": [
Expand Down
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/coverage
**/.next
**/node_modules
**/.git
**/.idea
47 changes: 13 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Checkout
uses: tobysmith568/actions/.github/actions/checkout-pnpm-project@main
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npx eslint . --max-warnings 0
run: pnpm eslint . --max-warnings 0

- name: Run Prettier
run: npx prettier --check .
run: pnpm prettier --check .

- name: Run CSpell
run: npx cspell "**/*.*"
run: pnpm cspell "**/*.*"

build:
name: Build
Expand Down Expand Up @@ -69,19 +63,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Checkout
uses: tobysmith568/actions/.github/actions/checkout-pnpm-project@main
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Run Unit Tests
run: npx jest --ci --coverage
run: pnpm jest --ci --coverage

- name: Codecov
uses: codecov/[email protected]
Expand All @@ -95,19 +83,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Checkout
uses: tobysmith568/actions/.github/actions/checkout-pnpm-project@main
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Check licences
run: npx license-cop
run: pnpm license-cop

e2e:
needs:
Expand All @@ -123,13 +105,10 @@ jobs:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Checkout
uses: tobysmith568/actions/.github/actions/checkout-pnpm-project@main
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Download Docker image
uses: actions/download-artifact@v4
Expand Down
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
FROM node:18-alpine AS deps
FROM node:18 AS deps

WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY package.json pnpm-lock.yaml ./
RUN corepack enable
RUN pnpm install --frozen-lockfile

FROM node:18-alpine AS builder
FROM node:18 AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ARG NEXT_PUBLIC_YEAR
RUN npm run build
RUN corepack enable
RUN pnpm run build

FROM node:18-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NODE_ENV=production

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
Expand All @@ -31,6 +33,6 @@ USER nextjs

EXPOSE 3000

ENV PORT 3000
ENV PORT=3000

CMD ["node", "server.js"]
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
Loading
Loading