From d192fb79c5f80e8560cfdcff67646834b76d139c Mon Sep 17 00:00:00 2001 From: Peppa Date: Tue, 17 Nov 2026 11:27:14 +0500 Subject: [PATCH] =?UTF-8?q?TPTIP-4:=20=D1=83=D1=87=D0=B5=D1=81=D1=82=D1=8C?= =?UTF-8?q?=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=8B-=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D0=BB=D1=83=D1=88=D0=BA=D0=B8=20=D0=B8=D0=B7=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- profile-server.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9f4caf..84b5110 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:24-alpine WORKDIR /app COPY package*.json ./ RUN npm ci -COPY profile-server.mjs server.js index.html gym-plan.i18n.js manifest.webmanifest sw.js icon.svg about.html about.i18n.json ./ +COPY profile-server.mjs server.js index.html gym-plan.i18n.js manifest.webmanifest sw.js icon.svg ./ COPY profile ./profile RUN npm run build && npm prune --omit=dev RUN mkdir /data && chown node:node /data diff --git a/profile-server.mjs b/profile-server.mjs index 637fc90..edd0eb7 100644 --- a/profile-server.mjs +++ b/profile-server.mjs @@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url'; import { ProfileService, InputError } from './profile/service.mjs'; if (process.env.SENTRY_DSN) Sentry.init({dsn:process.env.SENTRY_DSN,release:process.env.SENTRY_RELEASE,environment:process.env.SENTRY_ENVIRONMENT || 'dev',sendDefaultPii:false,beforeSend(event){ delete event.request; delete event.user; return event; }}); const root = fileURLToPath(new URL('.',import.meta.url)); -const files = new Map([['/profile/tracker-guard.js',['profile/tracker-guard.js','text/javascript']],['/gym-plan.i18n.js',['gym-plan.i18n.js','text/javascript']],['/manifest.webmanifest',['manifest.webmanifest','application/manifest+json']],['/sw.js',['sw.js','text/javascript']],['/icon.svg',['icon.svg','image/svg+xml']],['/about.html',['about.html','text/html']],['/about.i18n.json',['about.i18n.json','application/json']],['/',['profile/index.html','text/html']],['/profile/app.js',['profile/app.js','text/javascript']],['/profile/telemetry.js',['profile/telemetry.js','text/javascript']],['/profile/style.css',['profile/style.css','text/css']],['/profile/i18n.json',['profile/i18n.json','application/json']]]); +const files = new Map([['/profile/tracker-guard.js',['profile/tracker-guard.js','text/javascript']],['/gym-plan.i18n.js',['gym-plan.i18n.js','text/javascript']],['/manifest.webmanifest',['manifest.webmanifest','application/manifest+json']],['/sw.js',['sw.js','text/javascript']],['/icon.svg',['icon.svg','image/svg+xml']],['/',['profile/index.html','text/html']],['/profile/app.js',['profile/app.js','text/javascript']],['/profile/telemetry.js',['profile/telemetry.js','text/javascript']],['/profile/style.css',['profile/style.css','text/css']],['/profile/i18n.json',['profile/i18n.json','application/json']]]); export function createApp({database,secure = process.env.NODE_ENV === 'production'} = {}) { if (!database) mkdirSync(process.env.DATA_DIR || resolve(root,'data'),{recursive:true,mode:0o700}); const service = new ProfileService(database || resolve(process.env.DATA_DIR || resolve(root,'data'),'profile.sqlite'));