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.

Remove prestart script.

Mike Caoa4e2e468340e
diff --git a/Dockerfile b/Dockerfile
index 7f3f07395..16dd9872c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,5 @@
-# Build-time variables
-ARG NODE_VERSION=16
-ARG ALPINE_VERSION=3.15
-
-
# Build image
-FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS build
+FROM node:12.22-alpine AS build
ARG BASE_PATH
ARG DATABASE_TYPE
@@ -30,9 +25,8 @@ COPY . /build
RUN yarn next telemetry disable
RUN yarn build
-
# Production image
-FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS production
+FROM node:12.22-alpine AS production
WORKDIR /app
# Copy cached dependencies
@@ -44,7 +38,6 @@ COPY --from=build /build/node_modules/.prisma/ ./node_modules/.prisma/
COPY --from=build /build/yarn.lock /build/package.json ./
COPY --from=build /build/.next ./.next
COPY --from=build /build/public ./public
-COPY --from=build /build/scripts ./scripts
USER node
diff --git a/package.json b/package.json
index b8fcb04bb..d6150e566 100644
--- a/package.json
+++ b/package.json
@@ -12,8 +12,7 @@
"scripts": {
"dev": "next dev",
"build": "npm-run-all build-tracker build-geo build-db build-app",
- "start": "npm-run-all pre-start start-app",
- "start-app": "next start",
+ "start": "next start",
"start-env": "node -r dotenv/config scripts/start-env.js",
"build-app": "next build",
"build-tracker": "rollup -c rollup.tracker.config.js",
@@ -38,8 +37,7 @@
"change-password": "node scripts/change-password.js",
"lint": "next lint --quiet",
"prepare": "husky install",
- "postbuild": "node scripts/postbuild.js",
- "pre-start": "node scripts/prestart.js"
+ "postbuild": "node scripts/postbuild.js"
},
"lint-staged": {
"**/*.js": [
diff --git a/scripts/prestart.js b/scripts/prestart.js
deleted file mode 100644
index a13af8552..000000000
--- a/scripts/prestart.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('dotenv').config();
-const { sendTelemetry } = require('./telemetry');
-
-async function run() {
- if (!process.env.DISABLE_TELEMETRY) {
- await sendTelemetry('start');
- }
-}
-
-run();