feat: do not track in settings
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"watch": ["src"],
|
||||
"ignore": ["src/**/*.test.ts"],
|
||||
"ext": "ts,mjs,json,graphql",
|
||||
"exec": "rimraf build && esbuild `find src \\( -name '*.ts' \\)` --minify=true --platform=node --outdir=build --format=cjs && node build",
|
||||
"legacyWatch": true
|
||||
}
|
||||
"watch": [
|
||||
"src"
|
||||
],
|
||||
"ignore": [
|
||||
"src/**/*.test.ts"
|
||||
],
|
||||
"ext": "ts,mjs,json,graphql",
|
||||
"exec": "rimraf build && esbuild `find src \\( -name '*.ts' \\)` --platform=node --outdir=build --format=cjs && node build",
|
||||
"legacyWatch": true
|
||||
}
|
@@ -26,9 +26,11 @@
|
||||
"@iarna/toml": "2.2.5",
|
||||
"@ladjs/graceful": "3.0.2",
|
||||
"@prisma/client": "4.6.1",
|
||||
"@sentry/node": "7.21.1",
|
||||
"@sentry/tracing": "7.21.1",
|
||||
"axe": "11.0.0",
|
||||
"bcryptjs": "2.4.3",
|
||||
"bree": "9.1.2",
|
||||
"axe":"11.0.0",
|
||||
"cabin": "11.0.1",
|
||||
"compare-versions": "5.0.1",
|
||||
"csv-parse": "5.3.2",
|
||||
|
@@ -19,7 +19,7 @@ import { verifyRemoteDockerEngineFn } from './routes/api/v1/destinations/handler
|
||||
import { checkContainer } from './lib/docker';
|
||||
import { migrateApplicationPersistentStorage, migrateServicesToNewTemplate } from './lib';
|
||||
import { refreshTags, refreshTemplates } from './routes/api/v1/handlers';
|
||||
|
||||
import * as Sentry from '@sentry/node';
|
||||
declare module 'fastify' {
|
||||
interface FastifyInstance {
|
||||
config: {
|
||||
@@ -36,7 +36,7 @@ declare module 'fastify' {
|
||||
|
||||
const port = isDev ? 3001 : 3000;
|
||||
const host = '0.0.0.0';
|
||||
const sentryDSN = 'https://409f09bcb7af47928d3e0f46b78987f3@o1082494.ingest.sentry.io/4504236622217216';
|
||||
const sentryDSN = 'http://5c32291aa76244988b7a327c77f7588f@glitchtip.example.coolify.io/1';
|
||||
|
||||
(async () => {
|
||||
const settings = await prisma.setting.findFirst()
|
||||
@@ -111,7 +111,6 @@ const sentryDSN = 'https://409f09bcb7af47928d3e0f46b78987f3@o1082494.ingest.sent
|
||||
origin: isDev ? "*" : ''
|
||||
}
|
||||
})
|
||||
|
||||
// To detect allowed origins
|
||||
// fastify.addHook('onRequest', async (request, reply) => {
|
||||
// console.log(request.headers.host)
|
||||
@@ -259,12 +258,21 @@ async function initServer() {
|
||||
} else {
|
||||
await prisma.setting.update({ where: { id: '0' }, data: { sentryDSN } })
|
||||
}
|
||||
} else {
|
||||
if (settings.sentryDSN !== sentryDSN) {
|
||||
await prisma.setting.update({ where: { id: '0' }, data: { sentryDSN } })
|
||||
}
|
||||
}
|
||||
// Initialize Sentry
|
||||
|
||||
Sentry.init({
|
||||
dsn: sentryDSN,
|
||||
environment: isDev ? 'development' : 'production',
|
||||
release: version
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
try {
|
||||
console.log(`[001] Initializing server...`);
|
||||
await asyncExecShell(`docker network create --attachable coolify`);
|
||||
|
@@ -54,6 +54,7 @@ export async function listAllSettings(request: FastifyRequest) {
|
||||
export async function saveSettings(request: FastifyRequest<SaveSettings>, reply: FastifyReply) {
|
||||
try {
|
||||
const {
|
||||
doNotTrack,
|
||||
fqdn,
|
||||
isAPIDebuggingEnabled,
|
||||
isRegistrationEnabled,
|
||||
@@ -68,7 +69,7 @@ export async function saveSettings(request: FastifyRequest<SaveSettings>, reply:
|
||||
const { id } = await listSettings();
|
||||
await prisma.setting.update({
|
||||
where: { id },
|
||||
data: { isRegistrationEnabled, dualCerts, isAutoUpdateEnabled, isDNSCheckEnabled, DNSServers, isAPIDebuggingEnabled, }
|
||||
data: { doNotTrack, isRegistrationEnabled, dualCerts, isAutoUpdateEnabled, isDNSCheckEnabled, DNSServers, isAPIDebuggingEnabled, }
|
||||
});
|
||||
if (fqdn) {
|
||||
await prisma.setting.update({ where: { id }, data: { fqdn } });
|
||||
|
@@ -2,6 +2,7 @@ import { OnlyId } from "../../../../types"
|
||||
|
||||
export interface SaveSettings {
|
||||
Body: {
|
||||
doNotTrack: boolean,
|
||||
fqdn: string,
|
||||
isAPIDebuggingEnabled: boolean,
|
||||
isRegistrationEnabled: boolean,
|
||||
|
@@ -35,6 +35,7 @@
|
||||
let minPort = settings.minPort;
|
||||
let maxPort = settings.maxPort;
|
||||
let proxyDefaultRedirect = settings.proxyDefaultRedirect;
|
||||
let doNotTrack = settings.doNotTrack;
|
||||
|
||||
let forceSave = false;
|
||||
let fqdn = settings.fqdn;
|
||||
@@ -117,6 +118,9 @@
|
||||
async function changeSettings(name: any) {
|
||||
try {
|
||||
resetView();
|
||||
if (name === 'doNotTrack') {
|
||||
doNotTrack = !doNotTrack;
|
||||
}
|
||||
if (name === 'isRegistrationEnabled') {
|
||||
isRegistrationEnabled = !isRegistrationEnabled;
|
||||
}
|
||||
@@ -133,6 +137,7 @@
|
||||
isAPIDebuggingEnabled = !isAPIDebuggingEnabled;
|
||||
}
|
||||
await post(`/settings`, {
|
||||
doNotTrack,
|
||||
isAPIDebuggingEnabled,
|
||||
isRegistrationEnabled,
|
||||
dualCerts,
|
||||
@@ -458,6 +463,15 @@
|
||||
on:click={() => changeSettings('isAutoUpdateEnabled')}
|
||||
/>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 items-center">
|
||||
<Setting
|
||||
id="doNotTrack"
|
||||
bind:setting={doNotTrack}
|
||||
title="Do Not Track"
|
||||
description="Do not send error reports to Coolify developers or any telemetry."
|
||||
on:click={() => changeSettings('doNotTrack')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user