Skip to content
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
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/node_modules
**/dist
ui/dts
.env
data
.git
2 changes: 1 addition & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: get_version
uses: battila7/get-version-action@v2
run: echo "major=$(echo "${GITHUB_REF_NAME#v}" | cut -d. -f1)" >> "$GITHUB_OUTPUT"

- name: Send Keel notifications to koumoul.com
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reuse-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v5
uses: actions/checkout@v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to Github container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Prepare docker tags for main image
id: docker_meta_main
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository }}
tags: |
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Build and push main image
id: docker_build_main
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuse-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v5
uses: actions/checkout@v7

- uses: actions/setup-node@v5
- uses: actions/setup-node@v7
with:
node-version: 24
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install commitlint --edit ""
npx --no -- commitlint --edit "$1"
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# =============================
# Base Node image
# =============================
FROM node:24.11.1-alpine3.22 AS base
FROM node:24.22.0-alpine3.24 AS base

RUN apk upgrade --no-cache
WORKDIR /app
ENV NODE_ENV=production

Expand Down Expand Up @@ -46,7 +47,6 @@ RUN npm run build-types
# =============================
FROM installer AS ui

RUN npm i --no-save @rollup/rollup-linux-x64-musl
COPY --from=types /app/api/config api/config
COPY --from=types /app/api/types api/types
ADD /api/src/config.ts api/src/config.ts
Expand All @@ -68,6 +68,9 @@ RUN mkdir -p /app/api/node_modules
# =============================
FROM base AS main

# npm, corepack and yarn are never used at runtime and carry their own CVEs
RUN rm -rf /usr/local/lib/node_modules /usr/local/bin/npm /usr/local/bin/npx /usr/local/bin/corepack /opt/yarn-* /usr/local/bin/yarn /usr/local/bin/yarnpkg

COPY --from=api-installer /app/node_modules node_modules
COPY api api
COPY --from=types /app/api/config api/config
Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@data-fair/lib-express": "^1.27.0",
"@data-fair/lib-node": "^2.12.1",
"config": "^3.3.12",
"config": "^5.0.1",
"express": "^5.0.1",
"http-terminator": "^3.2.0",
"prom-client": "^15.1.3"
Expand Down
8 changes: 6 additions & 2 deletions api/src/admin/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ router.use(async (req, res, next) => {
next()
})

let info = { version: process.env.NODE_ENV }
let info: Record<string, string> = { version: process.env.NODE_ENV ?? 'development' }
if (process.env.NODE_ENV === 'production') {
info = JSON.parse(await readFile(resolve(import.meta.dirname, '../../../BUILD.json'), 'utf8'))
try {
info = JSON.parse(await readFile(resolve(import.meta.dirname, '../../../BUILD.json'), 'utf8'))
} catch {
info = { version: 'unknown (built without CI)' }
}
}
router.get('/info', (req, res) => {
res.send(info)
Expand Down
1 change: 0 additions & 1 deletion api/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { assertValid } from '../config/type/index.ts'
import config from 'config'

// we reload the config instead of using the singleton from the config module for testing purposes
// @ts-ignore
const apiConfig = process.env.NODE_ENV === 'test' ? config.util.loadFileConfigs(process.env.NODE_CONFIG_DIR, { skipConfigSources: true }) : config
assertValid(apiConfig, { lang: 'en', name: 'config', internal: true })

Expand Down
1 change: 0 additions & 1 deletion commitlint.config.cjs

This file was deleted.

1 change: 1 addition & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-conventional'] }
Loading
Loading