mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
feat(server): adjust telemetry config (#6424)
This commit is contained in:
3
.github/deployment/self-host/compose.yaml
vendored
3
.github/deployment/self-host/compose.yaml
vendored
@@ -30,6 +30,9 @@ services:
|
|||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL}
|
- AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL}
|
||||||
- AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD}
|
- AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD}
|
||||||
|
# Telemetry allows us to collect data on how you use the affine. This data will helps us improve the app and provide better features.
|
||||||
|
# Uncomment next line if you wish to quit telemetry.
|
||||||
|
# - TELEMETRY_ENABLE=false
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
container_name: affine_redis
|
container_name: affine_redis
|
||||||
|
|||||||
@@ -36,4 +36,5 @@ AFFiNE.ENV_MAP = {
|
|||||||
'featureFlags.syncClientVersionCheck',
|
'featureFlags.syncClientVersionCheck',
|
||||||
'boolean',
|
'boolean',
|
||||||
],
|
],
|
||||||
|
TELEMETRY_ENABLE: ['telemetry.enabled', 'boolean'],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ export class ServerConfigType {
|
|||||||
description: 'credentials requirement',
|
description: 'credentials requirement',
|
||||||
})
|
})
|
||||||
credentialsRequirement!: CredentialsRequirementType;
|
credentialsRequirement!: CredentialsRequirementType;
|
||||||
|
|
||||||
|
@Field({ description: 'enable telemetry' })
|
||||||
|
enableTelemetry!: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ServerConfigResolver {
|
export class ServerConfigResolver {
|
||||||
@@ -87,6 +90,7 @@ export class ServerConfigResolver {
|
|||||||
credentialsRequirement: {
|
credentialsRequirement: {
|
||||||
password: AFFiNE.auth.password,
|
password: AFFiNE.auth.password,
|
||||||
},
|
},
|
||||||
|
enableTelemetry: AFFiNE.telemetry.enabled,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ export const getDefaultAFFiNEConfig: () => AFFiNEConfig = () => {
|
|||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
telemetry: {
|
telemetry: {
|
||||||
enabled: isSelfhosted && !process.env.DISABLE_SERVER_TELEMETRY,
|
enabled: isSelfhosted,
|
||||||
token: '389c0615a69b57cca7d3fa0a4824c930',
|
token: '389c0615a69b57cca7d3fa0a4824c930',
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
|
|||||||
Reference in New Issue
Block a user