Skip to content

Commit 0d4638c

Browse files
authored
Merge pull request #169 from buerokratt/dev
Merging dev to test
2 parents 23e9115 + dd83803 commit 0d4638c

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

.github/workflows/check-version.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ jobs:
4444
run: |
4545
awk -v branch="${{ env.BRANCH }}" ' /^[0-9a-zA-Z]+$/ { current_branch = $0; } current_branch == branch && /^[A-Z_]+=/{ print $0; }' release.env | tee -a $GITHUB_ENV >> .env
4646
echo "BUILDTIME=$(($(date +%s%N)/1000000))" >> .env
47-
echo "RELEASE=${{ env.BRANCH }}" >> .env
48-
47+
4948
- name: Set repo
5049
run: |
5150
LOWER_CASE_GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
88

99
RUN apk add --no-cache chromium && apk add --no-cache curl
1010
COPY package.json .
11+
COPY .env .env
1112
# Uncomment this when you run npm install locally
1213
#RUN npm ci --ignore-scripts
1314
RUN npm install --ignore-scripts
1415
# Run image
1516
FROM build AS run
1617
USER node
18+
19+
COPY .env /workspace/app/.env
1720
COPY controllers controllers
1821
COPY views views
1922
COPY lib lib

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ services:
88
- 3000:3000
99
networks:
1010
- node
11-
env_file:
12-
- .env
1311

1412
networks:
1513
node:

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"body-parser": "^1.20.3",
1717
"chokidar": "^4.0.1",
1818
"crypto-js": "^4.1.1",
19+
"dotenv": "^16.5.0",
1920
"escape-string-regexp": "^5.0.0",
2021
"exceljs": "^4.4.0",
2122
"express": "^4.21.2",

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import fs from "fs";
88
import files from "./controllers/files.js";
99
import crypto from "crypto";
1010
import bodyParser from "body-parser";
11+
import 'dotenv/config'
1112

1213
import encryption from "./controllers/encryption.js";
1314
import decryption from "./controllers/decryption.js";
@@ -59,7 +60,6 @@ const rateLimit = setRateLimit({
5960

6061
const startTimestamp = new Date().getTime();
6162
const appName = process.env.APP_NAME || "DataMapper";
62-
const release = process.env.RELEASE || "unknown";
6363
const major = process.env.MAJOR || "unknown";
6464
const minor = process.env.MINOR || "unknown";
6565
const patch = process.env.PATCH || "unknown";
@@ -290,7 +290,7 @@ app.get("/status", (req, res) => res.status(200).send("ok"));
290290
app.get("/healthz", (req, res) => {
291291
res.status(200).send({
292292
appName,
293-
version: `${release}-${major}.${minor}.${patch}`,
293+
version: `v${major}.${minor}.${patch}`,
294294
packagingTime: process.env.BUILDTIME,
295295
appStartTime: startTimestamp,
296296
serverTime: new Date().getTime(),

0 commit comments

Comments
 (0)