mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 10:05:02 +03:00
feat(server): adjust telemetry config (#6424)
This commit is contained in:
parent
8bd2408b0c
commit
366e0a4b60
3
.github/deployment/self-host/compose.yaml
vendored
3
.github/deployment/self-host/compose.yaml
vendored
@ -30,6 +30,9 @@ services:
|
||||
- NODE_ENV=production
|
||||
- AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL}
|
||||
- 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:
|
||||
image: redis
|
||||
container_name: affine_redis
|
||||
|
@ -36,4 +36,5 @@ AFFiNE.ENV_MAP = {
|
||||
'featureFlags.syncClientVersionCheck',
|
||||
'boolean',
|
||||
],
|
||||
TELEMETRY_ENABLE: ['telemetry.enabled', 'boolean'],
|
||||
};
|
||||
|
@ -66,6 +66,9 @@ export class ServerConfigType {
|
||||
description: 'credentials requirement',
|
||||
})
|
||||
credentialsRequirement!: CredentialsRequirementType;
|
||||
|
||||
@Field({ description: 'enable telemetry' })
|
||||
enableTelemetry!: boolean;
|
||||
}
|
||||
|
||||
export class ServerConfigResolver {
|
||||
@ -87,6 +90,7 @@ export class ServerConfigResolver {
|
||||
credentialsRequirement: {
|
||||
password: AFFiNE.auth.password,
|
||||
},
|
||||
enableTelemetry: AFFiNE.telemetry.enabled,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ export const getDefaultAFFiNEConfig: () => AFFiNEConfig = () => {
|
||||
enabled: false,
|
||||
},
|
||||
telemetry: {
|
||||
enabled: isSelfhosted && !process.env.DISABLE_SERVER_TELEMETRY,
|
||||
enabled: isSelfhosted,
|
||||
token: '389c0615a69b57cca7d3fa0a4824c930',
|
||||
},
|
||||
plugins: {
|
||||
|
Loading…
Reference in New Issue
Block a user