feat(gui): Add ability to set analytics tokens via env

This adds the ability to set the Sentry & Mixpanel API tokens
via environment variables.

Change-Type: patch
This commit is contained in:
Jonas Hermsmeier 2018-05-11 16:23:28 +02:00
parent 196f16b941
commit 150e8112ea
No known key found for this signature in database
GPG Key ID: 1B870F801A0CEE9F

View File

@ -23,8 +23,10 @@ const settings = require('../models/settings')
resinCorvus.install({
services: {
sentry: _.get(packageJSON, [ 'analytics', 'sentry', 'token' ]),
mixpanel: _.get(packageJSON, [ 'analytics', 'mixpanel', 'token' ])
sentry: process.env.ANALYTICS_SENTRY_TOKEN ||
_.get(packageJSON, [ 'analytics', 'sentry', 'token' ]),
mixpanel: process.env.ANALYTICS_MIXPANEL_TOKEN ||
_.get(packageJSON, [ 'analytics', 'mixpanel', 'token' ])
},
options: {
release: packageJSON.version,