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
20 changes: 20 additions & 0 deletions src/Servers/FulmineServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:22-trixie-slim
# fulmine.js depends on uWebSockets.js, which npm installs from its git tag rather than from the
# registry, and whose prebuilt binary needs glibc 2.38, which is why this is trixie and not the
# bookworm -slim every other server here uses. git fetches it over https because npm asks for the
# repository over ssh by default and this image carries no key.
RUN apt-get update \
&& apt-get install -y --no-install-recommends git ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& git config --global url."https://github.com/".insteadOf ssh://git@github.com/
WORKDIR /app
COPY src/Servers/FulmineServer/package.json .
# the version is pinned rather than ranged, since this repo does not keep lock files, and nothing
# here needs an install script to run
RUN npm install --omit=dev --ignore-scripts

Check warning on line 14 in src/Servers/FulmineServer/Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=MDA2AV_Http11Probe&issues=AaAWFnaw2o3S_plOK1JR&open=AaAWFnaw2o3S_plOK1JR&pullRequest=154
# ExpressServer's application, not a copy of it. Fulmine.js is a drop-in replacement for Express 5,
# so the package is installed under the name "express" and the same file runs unchanged: what is
# probed here is the same application as the Express row, with only the framework behind it swapped.
COPY src/Servers/ExpressServer/server.js .
USER node
ENTRYPOINT ["node", "server.js", "8080"]
7 changes: 7 additions & 0 deletions src/Servers/FulmineServer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "fulmine-server",
"private": true,
"dependencies": {
"express": "npm:fulmine.js@5.13.3"
}
}
1 change: 1 addition & 0 deletions src/Servers/FulmineServer/probe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name": "Fulmine.js", "language": "JavaScript"}
Loading