Skip to content

Commit 4be4968

Browse files
committed
Adapt Docker support PR #154 for compatibility with current codebase
- Update Node.js version from 18 to 22 (matching engines >= 20) - Add required BASE_URL to env.sample and README Docker section - Remove obsolete HTTPS_UPGRADE/HTTPS_KEY_PIN settings from env.sample - Rename PAPERTRAIL_HOST/PORT to SYSLOG_HOST/PORT in env.sample - Update GitHub Actions checkout from v2 to v4 - Exclude MongoDB shell script mongo-init.js from ESLint
1 parent ffff9fc commit 4be4968

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424

2525
- name: Run tests
2626
run: docker build . --file Dockerfile
@@ -35,8 +35,8 @@ jobs:
3535
if: github.event_name == 'push'
3636

3737
steps:
38-
- uses: actions/checkout@v2
39-
38+
- uses: actions/checkout@v4
39+
4040
- name: Login to ghcr.io
4141
uses: docker/login-action@v2
4242
with:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
ARG NODE_VERSION=18.0.0
2+
ARG NODE_VERSION=22
33

44
FROM node:${NODE_VERSION}-alpine
55

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,10 @@ For production you should use a service like [Amazon SES](https://aws.amazon.com
344344

345345
### Docker compose
346346

347-
Docker images are built from this repository and available at ghcr. You can use the sample docker-compose.yml - review it and populate an .env file with the required [settings](#Settings) before running the server. To create the database automatically, the following parameters are needed in .env file:
347+
Docker images are built from this repository and available at ghcr. You can use the sample docker-compose.yml - review it and populate an .env file with the required [settings](#Settings) before running the server. `BASE_URL` must be set to the public-facing URL of your key server. To create the database automatically, the following parameters are needed in .env file:
348348

349349
```
350+
BASE_URL=https://keyserver.example.com
350351
MONGO_URI=mongodb:27017/keyserver_db
351352
MONGO_USER=keyserver
352353
MONGO_PASS=somepassword

env.sample

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
NODE_ENV=production
22
LOG_LEVEL=debug
33
PORT=3000
4-
PAPERTRAIL_HOST=''
5-
PAPERTRAIL_PORT=''
4+
BASE_URL=http://localhost:3000
5+
SYSLOG_HOST=''
6+
SYSLOG_PORT=''
67
MONGO_URI=mongodb:27017/keyserver_db
78
MONGO_USER=keyserver
89
MONGO_PASS=changeme
@@ -16,7 +17,4 @@ SMTP_STARTTLS=true
1617
SMTP_PGP=''
1718
SMTP_USER=''
1819
SMTP_PASS=''
19-
HTTPS_UPGRADE=true
20-
HTTPS_KEY_PIN=''
21-
HTTPS_KEY_PIN_BACKUP=''
2220
PUBLIC_KEY_PURGE_TIME=30

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import globals from "globals";
22
import js from "@eslint/js";
33

4-
export default [js.configs.recommended, {
4+
export default [{
5+
ignores: ["config/mongo-init.js"]
6+
}, js.configs.recommended, {
57
files: ["**/*.js"],
68
languageOptions: {
79
globals: {

0 commit comments

Comments
 (0)