跳转至

mattermost聊天软件

第一步:准备文件夹

在群晖的 File Station 中,进入 docker 文件夹,手动建立以下结构(这能避免你之前遇到的 Bind mount

Image

  • Config.json
{
    "ServiceSettings": {
        "SiteURL": "http://ip:8065",
        "WebsocketURL": "",
        "LicenseFileLocation": "",
        "ListenAddress": ":8065",
        "ConnectionSecurity": "",
        "TLSCertFile": "",
        "TLSKeyFile": "",
        "TLSMinVer": "1.2",
        "TLSStrictTransport": false,
        "TLSStrictTransportMaxAge": 63072000,
        "TLSOverwriteCiphers": [],
        "UseLetsEncrypt": false,
        "LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
        "Forward80To443": false,
        "TrustedProxyIPHeader": [],
        "ReadTimeout": 300,
        "WriteTimeout": 300,
        "IdleTimeout": 60,
        "MaximumLoginAttempts": 10,
        "GoroutineHealthThreshold": -1,
        "EnableOAuthServiceProvider": true,
        "EnableDynamicClientRegistration": false,
        "DCRRedirectURIAllowlist": [],
        "EnableIncomingWebhooks": true,
        "EnableOutgoingWebhooks": true,
        "EnableOutgoingOAuthConnections": false,
        "EnableCommands": true,
        "OutgoingIntegrationRequestsTimeout": 30,
        "EnablePostUsernameOverride": false,
        "EnablePostIconOverride": false,
        "GoogleDeveloperKey": "",
        "EnableLinkPreviews": true,
        "EnablePermalinkPreviews": true,
        "RestrictLinkPreviews": "",
        "EnableTesting": false,
        "EnableDeveloper": false,
        "DeveloperFlags": "",
        "EnableClientPerformanceDebugging": false,
        "EnableSecurityFixAlert": true,
        "EnableInsecureOutgoingConnections": false,
        "AllowedUntrustedInternalConnections": "",
        "EnableMultifactorAuthentication": false,
        "EnforceMultifactorAuthentication": false,
        "EnableUserAccessTokens": false,
        "AllowCorsFrom": "",
        "CorsExposedHeaders": "",
        "CorsAllowCredentials": false,
        "CorsDebug": false,
        "AllowCookiesForSubdomains": false,
        "ExtendSessionLengthWithActivity": false,
        "TerminateSessionsOnPasswordChange": false,
        "SessionLengthWebInDays": 180,
        "SessionLengthWebInHours": 4320,
        "SessionLengthMobileInDays": 180,
        "SessionLengthMobileInHours": 4320,
        "SessionLengthSSOInDays": 30,
        "SessionLengthSSOInHours": 720,
        "SessionCacheInMinutes": 10,
        "SessionIdleTimeoutInMinutes": 43200,
        "WebsocketSecurePort": 443,
        "WebsocketPort": 80,
        "WebserverMode": "gzip",
        "EnableGifPicker": true,
        "GiphySdkKey": "",
        "EnableCustomEmoji": true,
        "EnableEmojiPicker": true,
        "PostEditTimeLimit": -1,
        "TimeBetweenUserTypingUpdatesMilliseconds": 5000,
        "EnableCrossTeamSearch": true,
        "EnablePostSearch": true,
        "EnableFileSearch": true,
        "MinimumHashtagLength": 3,
        "EnableUserTypingMessages": true,
        "EnableChannelViewedMessages": true,
        "EnableUserStatuses": true,
        "ExperimentalEnableAuthenticationTransfer": true,
        "ClusterLogTimeoutMilliseconds": 2000,
        "EnableTutorial": true,
        "EnableOnboardingFlow": true,
        "ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
        "ExperimentalGroupUnreadChannels": "disabled",
        "EnableAPITeamDeletion": false,
        "EnableAPITriggerAdminNotifications": false,
        "EnableAPIUserDeletion": false,
        "EnableAPIPostDeletion": false,
        "EnableDesktopLandingPage": true,
        "MinimumDesktopAppVersion": "",
        "ExperimentalEnableHardenedMode": false,
        "ExperimentalStrictCSRFEnforcement": false,
        "EnableEmailInvitations": true,
        "DisableBotsWhenOwnerIsDeactivated": true,
        "EnableBotAccountCreation": false,
        "EnableSVGs": true,
        "EnableLatex": true,
        "EnableInlineLatex": true,
        "PostPriority": true,
        "AllowPersistentNotifications": true,
        "AllowPersistentNotificationsForGuests": false,
        "PersistentNotificationIntervalMinutes": 5,
        "PersistentNotificationMaxCount": 6,
        "PersistentNotificationMaxRecipients": 5,
        "EnableBurnOnRead": true,
        "BurnOnReadDurationSeconds": 600,
        "BurnOnReadMaximumTimeToLiveSeconds": 604800,
        "BurnOnReadSchedulerFrequencySeconds": 600,
        "EnableAPIChannelDeletion": false,
        "EnableLocalMode": false,
        "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket",
        "EnableAWSMetering": false,
        "AWSMeteringTimeoutSeconds": 30,
        "SplitKey": "",
        "FeatureFlagSyncIntervalSeconds": 30,
        "DebugSplit": false,
        "ThreadAutoFollow": true,
        "CollapsedThreads": "always_on",
        "ManagedResourcePaths": "",
        "EnableCustomGroups": true,
        "AllowSyncedDrafts": true,
        "UniqueEmojiReactionLimitPerPost": 50,
        "RefreshPostStatsRunTime": "00:00",
        "MaximumPayloadSizeBytes": 300000,
        "MaximumURLLength": 2048,
        "ScheduledPosts": true,
        "EnableWebHubChannelIteration": false,
        "FrameAncestors": "",
        "DeleteAccountLink": ""
    },
    "TeamSettings": {
        "SiteName": "Mattermost",
        "MaxUsersPerTeam": 50,
        "EnableJoinLeaveMessageByDefault": true,
        "EnableUserCreation": true,
        "EnableOpenServer": false,
        "EnableUserDeactivation": false,
        "RestrictCreationToDomains": "",
        "EnableCustomUserStatuses": true,
        "EnableCustomBrand": false,
        "CustomBrandText": "",
        "CustomDescriptionText": "",
        "RestrictDirectMessage": "any",
        "EnableLastActiveTime": true,
        "UserStatusAwayTimeout": 300,
        "MaxChannelsPerTeam": 2000,
        "MaxNotificationsPerChannel": 1000,
        "EnableConfirmNotificationsToChannel": true,
        "TeammateNameDisplay": "username",
        "ExperimentalViewArchivedChannels": true,
        "ExperimentalEnableAutomaticReplies": false,
        "LockTeammateNameDisplay": false,
        "ExperimentalPrimaryTeam": "",
        "ExperimentalDefaultChannels": []
    },
    "ClientRequirements": {
        "AndroidLatestVersion": "",
        "AndroidMinVersion": "",
        "IosLatestVersion": "",
        "IosMinVersion": ""
    },
    "SqlSettings": {
        "DriverName": "postgres",
        "DataSource": "postgres://mmuser:mmuser_password@db:5432/mattermost?sslmode=disable\u0026connect_timeout=10",
        "DataSourceReplicas": [],
        "DataSourceSearchReplicas": [],
        "MaxIdleConns": 50,
        "ConnMaxLifetimeMilliseconds": 3600000,
        "ConnMaxIdleTimeMilliseconds": 300000,
        "MaxOpenConns": 100,
        "Trace": false,
        "AtRestEncryptKey": "c3nexeehb84dsr93aego8m4hnswmd6fh",
        "QueryTimeout": 30,
        "DisableDatabaseSearch": false,
        "MigrationsStatementTimeoutSeconds": 100000,
        "ReplicaLagSettings": [],
        "ReplicaMonitorIntervalSeconds": 5
    },
    "LogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "DEBUG",
        "ConsoleJson": true,
        "EnableColor": false,
        "EnableFile": true,
        "FileLevel": "INFO",
        "FileJson": true,
        "FileLocation": "",
        "EnableWebhookDebugging": true,
        "EnableDiagnostics": true,
        "EnableSentry": true,
        "AdvancedLoggingJSON": {},
        "MaxFieldSize": 2048
    },
    "ExperimentalAuditSettings": {
        "FileEnabled": false,
        "FileName": "",
        "AdvancedLoggingJSON": {},
        "Certificate": ""
    },
    "PasswordSettings": {
        "MinimumLength": 8,
        "Lowercase": false,
        "Number": false,
        "Uppercase": false,
        "Symbol": false,
        "EnableForgotLink": true
    },
    "FileSettings": {
        "EnableFileAttachments": true,
        "EnableMobileUpload": true,
        "EnableMobileDownload": true,
        "MaxFileSize": 104857600,
        "MaxImageResolution": 33177600,
        "MaxImageDecoderConcurrency": -1,
        "DriverName": "local",
        "Directory": "./data/",
        "EnablePublicLink": false,
        "ExtractContent": true,
        "ArchiveRecursion": false,
        "PublicLinkSalt": "76hfhxhzhunn76pqmet4ofw5xyks73kx",
        "InitialFont": "nunito-bold.ttf",
        "AmazonS3AccessKeyId": "",
        "AmazonS3SecretAccessKey": "",
        "AmazonS3Bucket": "",
        "AmazonS3PathPrefix": "",
        "AmazonS3Region": "",
        "AmazonS3Endpoint": "s3.amazonaws.com",
        "AmazonS3SSL": true,
        "AmazonS3SignV2": false,
        "AmazonS3SSE": false,
        "AmazonS3Trace": false,
        "AmazonS3RequestTimeoutMilliseconds": 30000,
        "AmazonS3UploadPartSizeBytes": 5242880,
        "AmazonS3StorageClass": "",
        "DedicatedExportStore": false,
        "ExportDriverName": "local",
        "ExportDirectory": "./data/",
        "ExportAmazonS3AccessKeyId": "",
        "ExportAmazonS3SecretAccessKey": "",
        "ExportAmazonS3Bucket": "",
        "ExportAmazonS3PathPrefix": "",
        "ExportAmazonS3Region": "",
        "ExportAmazonS3Endpoint": "s3.amazonaws.com",
        "ExportAmazonS3SSL": true,
        "ExportAmazonS3SignV2": false,
        "ExportAmazonS3SSE": false,
        "ExportAmazonS3Trace": false,
        "ExportAmazonS3RequestTimeoutMilliseconds": 30000,
        "ExportAmazonS3PresignExpiresSeconds": 21600,
        "ExportAmazonS3UploadPartSizeBytes": 104857600,
        "ExportAmazonS3StorageClass": ""
    },
    "EmailSettings": {
        "EnableSignUpWithEmail": true,
        "EnableSignInWithEmail": true,
        "EnableSignInWithUsername": true,
        "SendEmailNotifications": true,
        "UseChannelInEmailNotifications": false,
        "RequireEmailVerification": false,
        "FeedbackName": "",
        "FeedbackEmail": "test@example.com",
        "ReplyToAddress": "test@example.com",
        "FeedbackOrganization": "",
        "EnableSMTPAuth": false,
        "SMTPUsername": "",
        "SMTPPassword": "",
        "SMTPServer": "localhost",
        "SMTPPort": "10025",
        "SMTPServerTimeout": 10,
        "ConnectionSecurity": "",
        "SendPushNotifications": false,
        "PushNotificationServer": "",
        "PushNotificationContents": "full",
        "PushNotificationBuffer": 1000,
        "EnableEmailBatching": false,
        "EmailBatchingBufferSize": 256,
        "EmailBatchingInterval": 30,
        "EnablePreviewModeBanner": true,
        "SkipServerCertificateVerification": false,
        "EmailNotificationContentsType": "full",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7"
    },
    "RateLimitSettings": {
        "Enable": false,
        "PerSec": 10,
        "MaxBurst": 100,
        "MemoryStoreSize": 10000,
        "VaryByRemoteAddr": true,
        "VaryByUser": false,
        "VaryByHeader": ""
    },
    "PrivacySettings": {
        "ShowEmailAddress": true,
        "ShowFullName": true,
        "UseAnonymousURLs": false
    },
    "SupportSettings": {
        "TermsOfServiceLink": "https://mattermost.com/pl/terms-of-use/",
        "PrivacyPolicyLink": "https://mattermost.com/pl/privacy-policy/",
        "AboutLink": "https://mattermost.com/pl/about-mattermost",
        "HelpLink": "https://mattermost.com/pl/help/",
        "ReportAProblemLink": "https://mattermost.com/pl/report-a-bug",
        "ReportAProblemType": "default",
        "ReportAProblemMail": "",
        "AllowDownloadLogs": true,
        "ForgotPasswordLink": "",
        "SupportEmail": "",
        "CustomTermsOfServiceEnabled": false,
        "CustomTermsOfServiceReAcceptancePeriod": 365,
        "EnableAskCommunityLink": true
    },
    "AnnouncementSettings": {
        "EnableBanner": false,
        "BannerText": "",
        "BannerColor": "#f2a93b",
        "BannerTextColor": "#333333",
        "AllowBannerDismissal": true,
        "AdminNoticesEnabled": true,
        "UserNoticesEnabled": true,
        "NoticesURL": "https://notices.mattermost.com/",
        "NoticesFetchFrequency": 3600,
        "NoticesSkipCache": false
    },
    "ThemeSettings": {
        "EnableThemeSelection": true,
        "DefaultTheme": "default",
        "AllowCustomThemes": true,
        "AllowedThemes": []
    },
    "GitLabSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "",
        "AuthEndpoint": "",
        "TokenEndpoint": "",
        "UserAPIEndpoint": "",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": "",
        "UsePreferredUsername": false
    },
    "GoogleSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "profile email",
        "AuthEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
        "TokenEndpoint": "https://www.googleapis.com/oauth2/v4/token",
        "UserAPIEndpoint": "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": "",
        "UsePreferredUsername": false
    },
    "Office365Settings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "User.Read",
        "AuthEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
        "TokenEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
        "UserAPIEndpoint": "https://graph.microsoft.com/v1.0/me",
        "DiscoveryEndpoint": "",
        "DirectoryId": "",
        "UsePreferredUsername": false
    },
    "OpenIdSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "profile openid email",
        "AuthEndpoint": "",
        "TokenEndpoint": "",
        "UserAPIEndpoint": "",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": "#145DBF",
        "UsePreferredUsername": false
    },
    "LdapSettings": {
        "Enable": false,
        "EnableSync": false,
        "LdapServer": "",
        "LdapPort": 389,
        "ConnectionSecurity": "",
        "BaseDN": "",
        "BindUsername": "",
        "BindPassword": "",
        "MaximumLoginAttempts": 10,
        "UserFilter": "",
        "GroupFilter": "",
        "GuestFilter": "",
        "EnableAdminFilter": false,
        "AdminFilter": "",
        "GroupDisplayNameAttribute": "",
        "GroupIdAttribute": "",
        "FirstNameAttribute": "",
        "LastNameAttribute": "",
        "EmailAttribute": "",
        "UsernameAttribute": "",
        "NicknameAttribute": "",
        "IdAttribute": "",
        "PositionAttribute": "",
        "LoginIdAttribute": "",
        "PictureAttribute": "",
        "SyncIntervalMinutes": 60,
        "ReAddRemovedMembers": false,
        "SkipCertificateVerification": false,
        "PublicCertificateFile": "",
        "PrivateKeyFile": "",
        "QueryTimeout": 60,
        "MaxPageSize": 0,
        "LoginFieldName": "",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7"
    },
    "ComplianceSettings": {
        "Enable": false,
        "Directory": "./data/",
        "EnableDaily": false,
        "BatchSize": 30000
    },
    "LocalizationSettings": {
        "DefaultServerLocale": "en",
        "DefaultClientLocale": "en",
        "AvailableLocales": "",
        "EnableExperimentalLocales": false
    },
    "SamlSettings": {
        "Enable": false,
        "EnableSyncWithLdap": false,
        "EnableSyncWithLdapIncludeAuth": false,
        "IgnoreGuestsLdapSync": false,
        "Verify": true,
        "Encrypt": true,
        "SignRequest": false,
        "IdpURL": "",
        "IdpDescriptorURL": "",
        "IdpMetadataURL": "",
        "ServiceProviderIdentifier": "",
        "AssertionConsumerServiceURL": "",
        "SignatureAlgorithm": "RSAwithSHA256",
        "CanonicalAlgorithm": "Canonical1.0",
        "ScopingIDPProviderId": "",
        "ScopingIDPName": "",
        "IdpCertificateFile": "",
        "PublicCertificateFile": "",
        "PrivateKeyFile": "",
        "IdAttribute": "",
        "GuestAttribute": "",
        "EnableAdminAttribute": false,
        "AdminAttribute": "",
        "FirstNameAttribute": "",
        "LastNameAttribute": "",
        "EmailAttribute": "",
        "UsernameAttribute": "",
        "NicknameAttribute": "",
        "LocaleAttribute": "",
        "PositionAttribute": "",
        "LoginButtonText": "SAML",
        "LoginButtonColor": "#34a28b",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#ffffff"
    },
    "NativeAppSettings": {
        "AppCustomURLSchemes": [
            "mmauth://",
            "mmauthbeta://"
        ],
        "AppDownloadLink": "https://mattermost.com/pl/download-apps",
        "AndroidAppDownloadLink": "https://mattermost.com/pl/android-app/",
        "IosAppDownloadLink": "https://mattermost.com/pl/ios-app/",
        "MobileExternalBrowser": false,
        "MobileEnableBiometrics": false,
        "MobilePreventScreenCapture": false,
        "MobileJailbreakProtection": false,
        "MobileEnableSecureFilePreview": false,
        "MobileAllowPdfLinkNavigation": false,
        "EnableIntuneMAM": false
    },
    "IntuneSettings": {
        "Enable": false,
        "TenantId": "",
        "ClientId": "",
        "AuthService": ""
    },
    "CacheSettings": {
        "CacheType": "lru",
        "RedisAddress": "",
        "RedisPassword": "",
        "RedisDB": -1,
        "RedisCachePrefix": "",
        "DisableClientCache": false
    },
    "ClusterSettings": {
        "Enable": false,
        "ClusterName": "",
        "OverrideHostname": "",
        "NetworkInterface": "",
        "BindAddress": "",
        "AdvertiseAddress": "",
        "UseIPAddress": true,
        "EnableGossipCompression": true,
        "EnableGossipEncryption": true,
        "ReadOnlyConfig": true,
        "GossipPort": 8074
    },
    "MetricsSettings": {
        "Enable": false,
        "BlockProfileRate": 0,
        "ListenAddress": ":8067",
        "EnableClientMetrics": true,
        "EnableNotificationMetrics": true,
        "ClientSideUserIds": []
    },
    "ExperimentalSettings": {
        "ClientSideCertEnable": false,
        "LinkMetadataTimeoutMilliseconds": 5000,
        "RestrictSystemAdmin": false,
        "EnableSharedChannels": false,
        "EnableRemoteClusterService": false,
        "DisableAppBar": false,
        "DisableRefetchingOnBrowserFocus": false,
        "DelayChannelAutocomplete": false,
        "DisableWakeUpReconnectHandler": false,
        "UsersStatusAndProfileFetchingPollIntervalMilliseconds": 3000,
        "YoutubeReferrerPolicy": false,
        "ExperimentalChannelCategorySorting": false
    },
    "AnalyticsSettings": {
        "MaxUsersForStatistics": 2500
    },
    "ElasticsearchSettings": {
        "ConnectionURL": "http://localhost:9200",
        "Backend": "elasticsearch",
        "Username": "elastic",
        "Password": "changeme",
        "EnableIndexing": false,
        "EnableSearching": false,
        "EnableCJKAnalyzers": false,
        "EnableAutocomplete": false,
        "Sniff": true,
        "PostIndexReplicas": 1,
        "PostIndexShards": 1,
        "ChannelIndexReplicas": 1,
        "ChannelIndexShards": 1,
        "UserIndexReplicas": 1,
        "UserIndexShards": 1,
        "AggregatePostsAfterDays": 365,
        "PostsAggregatorJobStartTime": "03:00",
        "IndexPrefix": "",
        "GlobalSearchPrefix": "",
        "LiveIndexingBatchSize": 10,
        "BatchSize": 10000,
        "RequestTimeoutSeconds": 30,
        "SkipTLSVerification": false,
        "CA": "",
        "ClientCert": "",
        "ClientKey": "",
        "Trace": "",
        "IgnoredPurgeIndexes": "",
        "EnableSearchPublicChannelsWithoutMembership": false
    },
    "DataRetentionSettings": {
        "EnableMessageDeletion": false,
        "EnableFileDeletion": false,
        "EnableBoardsDeletion": false,
        "MessageRetentionDays": 365,
        "MessageRetentionHours": 0,
        "FileRetentionDays": 365,
        "FileRetentionHours": 0,
        "BoardsRetentionDays": 365,
        "DeletionJobStartTime": "02:00",
        "BatchSize": 3000,
        "TimeBetweenBatchesMilliseconds": 100,
        "RetentionIdsBatchSize": 100,
        "PreservePinnedPosts": false
    },
    "MessageExportSettings": {
        "EnableExport": false,
        "ExportFormat": "actiance",
        "DailyRunTime": "01:00",
        "ExportFromTimestamp": 0,
        "BatchSize": 10000,
        "DownloadExportResults": false,
        "ChannelBatchSize": 100,
        "ChannelHistoryBatchSize": 10,
        "GlobalRelaySettings": {
            "CustomerType": "A9",
            "SMTPUsername": "",
            "SMTPPassword": "",
            "EmailAddress": "",
            "SMTPServerTimeout": 1800,
            "CustomSMTPServerName": "",
            "CustomSMTPPort": "25"
        }
    },
    "JobSettings": {
        "RunJobs": true,
        "RunScheduler": true,
        "CleanupJobsThresholdDays": -1,
        "CleanupConfigThresholdDays": -1
    },
    "PluginSettings": {
        "Enable": true,
        "EnableUploads": false,
        "AllowInsecureDownloadURL": false,
        "EnableHealthCheck": true,
        "Directory": "./plugins",
        "ClientDirectory": "./client/plugins",
        "Plugins": {},
        "PluginStates": {
            "com.mattermost.calls": {
                "Enable": true
            },
            "com.mattermost.nps": {
                "Enable": true
            },
            "mattermost-ai": {
                "Enable": true
            },
            "playbooks": {
                "Enable": true
            }
        },
        "EnableMarketplace": true,
        "EnableRemoteMarketplace": true,
        "AutomaticPrepackagedPlugins": true,
        "RequirePluginSignature": false,
        "MarketplaceURL": "https://api.integrations.mattermost.com",
        "SignaturePublicKeyFiles": [],
        "ChimeraOAuthProxyURL": ""
    },
    "DisplaySettings": {
        "CustomURLSchemes": [],
        "MaxMarkdownNodes": 0
    },
    "GuestAccountsSettings": {
        "Enable": false,
        "HideTags": false,
        "AllowEmailAccounts": true,
        "EnforceMultifactorAuthentication": false,
        "RestrictCreationToDomains": "",
        "EnableGuestMagicLink": false
    },
    "ImageProxySettings": {
        "Enable": false,
        "ImageProxyType": "local",
        "RemoteImageProxyURL": "",
        "RemoteImageProxyOptions": ""
    },
    "CloudSettings": {
        "CWSURL": "https://customers.mattermost.com",
        "CWSAPIURL": "https://portal.internal.prod.cloud.mattermost.com",
        "CWSMock": false,
        "Disable": false,
        "PreviewModalBucketURL": ""
    },
    "ImportSettings": {
        "Directory": "./import",
        "RetentionDays": 30
    },
    "ExportSettings": {
        "Directory": "./export",
        "RetentionDays": 30
    },
    "WranglerSettings": {
        "PermittedWranglerRoles": [],
        "AllowedEmailDomain": [],
        "MoveThreadMaxCount": 100,
        "MoveThreadToAnotherTeamEnable": false,
        "MoveThreadFromPrivateChannelEnable": false,
        "MoveThreadFromDirectMessageChannelEnable": false,
        "MoveThreadFromGroupMessageChannelEnable": false
    },
    "ConnectedWorkspacesSettings": {
        "EnableSharedChannels": false,
        "EnableRemoteClusterService": false,
        "DisableSharedChannelsStatusSync": false,
        "SyncUsersOnConnectionOpen": false,
        "GlobalUserSyncBatchSize": 25,
        "MaxPostsPerSync": 50,
        "MemberSyncBatchSize": 20
    },
    "AccessControlSettings": {
        "EnableAttributeBasedAccessControl": false,
        "EnableUserManagedAttributes": false
    },
    "ContentFlaggingSettings": {
        "EnableContentFlagging": false,
        "NotificationSettings": {
            "EventTargetMapping": {
                "assigned": [
                    "reviewers"
                ],
                "dismissed": [
                    "reviewers",
                    "reporter"
                ],
                "flagged": [
                    "reviewers"
                ],
                "removed": [
                    "reviewers",
                    "author",
                    "reporter"
                ]
            }
        },
        "AdditionalSettings": {
            "Reasons": [
                "Classification mismatch",
                "Need-to-know violation",
                "Personally identifiable information (PII) exposure",
                "Operational security (OPSEC) concern",
                "Controlled Unclassified Information (CUI) violation",
                "Unauthorized disclosure",
                "Other"
            ],
            "ReporterCommentRequired": true,
            "ReviewerCommentRequired": true,
            "HideFlaggedContent": true
        },
        "ReviewerSettings": {
            "CommonReviewers": true,
            "SystemAdminsAsReviewers": false,
            "TeamAdminsAsReviewers": true
        }
    },
    "AutoTranslationSettings": {
        "Enable": false,
        "RestrictDMAndGM": false,
        "Provider": "",
        "TargetLanguages": [
            "en"
        ],
        "Workers": 6,
        "TimeoutMs": 5000,
        "LibreTranslate": {
            "URL": "",
            "APIKey": ""
        },
        "Agents": {
            "LLMServiceID": ""
        }
    }
}

第二步:编写 YAML

在 Container Manager 中新建项目,粘贴以下代码。我已经为你换好了国内加速镜像地址

YAML

version: "3"

services:
  db:
    image: postgres:14-alpine
    restart: unless-stopped
    volumes:
      - /volume1/docker/mattermost/db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=mmuser
      - POSTGRES_PASSWORD=mmuser_password
      - POSTGRES_DB=mattermost

  mattermost:
    image: mattermost/mattermost-team-edition:latest
    restart: unless-stopped
    depends_on:
      - db
    environment:
      # 时区设置
      - TZ=Asia/Shanghai
      # 数据库连接
      - MM_SQLSETTINGS_DRIVERNAME=postgres
      - MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mmuser_password@db:5432/mattermost?sslmode=disable&connect_timeout=10
      # 站点 URL(如果有反代,请填入你的域名)
      - MM_SERVICESETTINGS_SITEURL=http://ip:8065
    ports:
      - "8065:8065"
    volumes:
      - /volume1/docker/mattermost/config:/mattermost/config
      - /volume1/docker/mattermost/data:/mattermost/data
      - /volume1/docker/mattermost/logs:/mattermost/logs
      - /volume1/docker/mattermost/plugins:/mattermost/plugins
      - /volume1/docker/mattermost/client/plugins:/mattermost/client/plugins
      - /volume1/docker/mattermost/bleve-indexes:/mattermost/bleve-indexes

第三步:初始化中文界面

部署成功并启动后,访问 http://ip:8065:点击 view in browser

  1. 创建管理员账号:第一个注册的人就是超级管理员。\

http://ip:8065/signup\_user\_complete/?id=

后台

http://ip:8065/admin_console

创建团队

http://ip:8065/create_team/team_url
  1. 进入设置

    • 点击左上角九宫格图标 -\> System Console (系统控制台)。

    • 找到 Site Configuration -\> Localization

    • Default Server Language: 改为 中文 \(简体\)

    • Default Client Language: 改为 中文 \(简体\)

    • Available Languages: 确保勾选了 中文 \(简体\)

    • 点击底部的 Save

  2. 个人语言设置

    • 返回聊天界面,点击左上角头像 -\> Account Settings

    • Display -\> Language -\> 选择 中文 (简体)


💡 VFX 工作的建议

  1. 传大文件:Mattermost 默认限制上传文件大小(通常是 50MB)。你可以去 系统控制台 -\> 文件 -\> 最大文件大小 改大点(比如 2048MB),这样你在局域网传素材非常爽。

  2. 通知机器人:可以利用 Mattermost 的 Incoming Webhooks,把你的 Python 脚本报警或者 GitLab 状态直接发到频道里,如下实例:

    import requests
    import json
    
    def send_mattermost_msg(webhook_url, text):
        payload = {"text": text}
        response = requests.post(
            webhook_url, 
            data=json.dumps(payload),
            headers={'Content-Type': 'application/json'}
        )
        return response.status_code
    
    # 使用示例
    url = "http://ip:8065/hooks/d5dxxg115f8iupc6tk51yusr8o"
    send_mattermost_msg(url, "### efx开发工具:发布任务已完成!\n项目:SNGX_NMLH")
    
    send_mattermost_msg(url, "rig XXX 已发布 请查收!\n项目:SNGX_NMLH")
    

Image

开启“开放注册”(最关键)

如果服务器不允许任何人加入,它就不会生成邀请链接。

  1. 在你的 config\.json 中找到 \&\#34;EnableOpenServer\&\#34;(在 TeamSettings 下)。

  2. 目前它是 false,请把它改成 true

  3. JSON

"TeamSettings": {
    "SiteName": "Mattermost",
    "MaxUsersPerTeam": 300,
    "EnableJoinLeaveMessageByDefault": true,
    "EnableUserCreation": true,
    "EnableOpenServer": true,  // 改这里
    ...
}
  1. 保存文件并重启 Mattermost 容器

要将 Mattermost 彻底中文化(包括菜单、系统提示和默认设置),我们需要分两步走:首先是你个人的界面设置,其次是整个服务器的默认语言设置。

第一步:修改个人界面语言(即刻生效)

  1. 点击界面左上角的 “xxx” 团队名称。

  2. 选择 “设置” (Settings)(就是你之前发过的 image\_0ae49a\.png 那个窗口)。

  3. 在左侧菜单点击 “显示” (Display)

  4. 找到 “语言” (Language) 选项,点击旁边的 “编辑” (Edit)

  5. 在下拉菜单中选择 “中文 (简体)”,点击 “保存” (Save)


第二步:修改全局默认语言(影响以后加入的新同事)

为了让以后进来的同事不用手动去改,你需要修改 config\.json 里的服务器默认配置。

在你之前发给我的 config\.json 中,找到 LocalizationSettings 部分,进行如下修改:

JSON

"LocalizationSettings": {
    "DefaultServerLocale": "zh-CN", // 从 en 改为 zh-CN"DefaultClientLocale": "zh-CN", // 从 en 改为 zh-CN"AvailableLocales": "",
    "EnableExperimentalLocales": false
},

操作建议:

  • 直接在群晖的文本编辑器里改完保存。

  • 重启容器,这样新创建的账号默认就是中文界面了。