TPTIP-4: учесть удаление страницы-заглушки из main
This commit is contained in:
parent
1a9564de52
commit
2aa6a702be
@ -2,7 +2,7 @@ FROM node:24-alpine
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
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
|
COPY profile ./profile
|
||||||
RUN npm run build && npm prune --omit=dev
|
RUN npm run build && npm prune --omit=dev
|
||||||
RUN mkdir /data && chown node:node /data
|
RUN mkdir /data && chown node:node /data
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
|
|||||||
import { ProfileService, InputError } from './profile/service.mjs';
|
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; }});
|
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 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'} = {}) {
|
export function createApp({database,secure = process.env.NODE_ENV === 'production'} = {}) {
|
||||||
if (!database) mkdirSync(process.env.DATA_DIR || resolve(root,'data'),{recursive:true,mode:0o700});
|
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'));
|
const service = new ProfileService(database || resolve(process.env.DATA_DIR || resolve(root,'data'),'profile.sqlite'));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user