Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Added script for starting with env variables.

Mike Cao074f248bcdbd
diff --git a/package.json b/package.json
index 5aeaf30ea..fe31a1f5d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "umami",
- "version": "0.66.0",
+ "version": "0.67.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
@@ -13,6 +13,7 @@
"dev": "next dev",
"build": "npm-run-all build-tracker build-lang build-geo build-db build-app",
"start": "next start",
+ "start-env": "node scripts/start-env.js",
"build-app": "next build",
"build-tracker": "rollup -c rollup.tracker.config.js",
"build-db": "npm-run-all copy-db-schema build-db-client",
diff --git a/scripts/start-env.js b/scripts/start-env.js
new file mode 100644
index 000000000..bfaf1330f
--- /dev/null
+++ b/scripts/start-env.js
@@ -0,0 +1,4 @@
+require('dotenv').config();
+const cli = require('next/dist/cli/next-start');
+
+cli.nextStart(['-p', process.env.PORT || 3000, '-H', process.env.HOSTNAME || '0.0.0.0']);