Skip to content

Commit 10e40e0

Browse files
committed
adding check if fredy is running in docker
1 parent 4ba6828 commit 10e40e0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ WORKDIR /fredy
3535
RUN apk add --no-cache chromium curl
3636

3737
ENV NODE_ENV=production \
38+
IS_DOCKER=true \
3839
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
3940
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
4041

lib/services/tracking/Tracker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ import { getSettings } from '../storage/settingsStorage.js';
1414
const deviceId = getUniqueId() || 'N/A';
1515
const version = await getPackageVersion();
1616
const FREDY_TRACKING_URL = 'https://fredy.orange-coding.net/tracking';
17+
const isDocker = process.env.IS_DOCKER != null;
1718

1819
const staticTrackingData = {
1920
operatingSystem: os.platform(),
2021
osVersion: os.release(),
22+
isDocker,
2123
arch: process.arch,
2224
language: process.env.LANG || 'en',
2325
nodeVersion: process.version || 'N/A',

0 commit comments

Comments
 (0)