From 7e5c7b8c36466fe354239da12935837cbfa1961b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 01:12:27 +0900 Subject: [PATCH] Add documentation and local build Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README.md: Build and deployment guide for beginners - Extend-Function.md: Extended files list and version upgrade guide - Unlock-License.md: License check removal documentation - Dockerfile.local: Local source build support ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Dockerfile.local | 29 +++ Extend-Function.md | 325 +++++++++++++++++++++++++++ README.md | 328 +++++++++++++++++++++++++++ Unlock-License.md | 539 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1221 insertions(+) create mode 100644 Dockerfile.local create mode 100644 Extend-Function.md create mode 100644 README.md create mode 100644 Unlock-License.md diff --git a/Dockerfile.local b/Dockerfile.local new file mode 100644 index 00000000..26fd7608 --- /dev/null +++ b/Dockerfile.local @@ -0,0 +1,29 @@ +FROM rockylinux:9 AS builder + +# Install build dependencies +RUN dnf install -y git golang make gcc + +# Copy local source +WORKDIR /build +COPY . . + +# Build +RUN go build -v -mod=vendor -o mattermost ./cmd/mattermost + +# Runtime image +FROM rockylinux:9-minimal + +RUN microdnf install -y ca-certificates tzdata && microdnf clean all + +WORKDIR /mattermost +COPY --from=builder /build/mattermost /mattermost/bin/mattermost +COPY --from=builder /build/config /mattermost/config +COPY --from=builder /build/i18n /mattermost/i18n +COPY --from=builder /build/fonts /mattermost/fonts +COPY --from=builder /build/templates /mattermost/templates +COPY --from=builder /build/client /mattermost/client + +RUN mkdir -p /mattermost/data /mattermost/logs /mattermost/plugins /mattermost/client/plugins + +EXPOSE 8065 +ENTRYPOINT ["/mattermost/bin/mattermost"] diff --git a/Extend-Function.md b/Extend-Function.md new file mode 100644 index 00000000..87b86331 --- /dev/null +++ b/Extend-Function.md @@ -0,0 +1,325 @@ +# Mattermost Community Enterprise - ํ™•์žฅ ๊ธฐ๋Šฅ ๋ฌธ์„œ + +์ด ๋ฌธ์„œ๋Š” Team Edition์—์„œ Enterprise ๊ธฐ๋Šฅ์„ ํ™œ์„ฑํ™”ํ•˜๊ธฐ ์œ„ํ•ด ์ƒ์„ฑ/์ˆ˜์ •๋œ ํŒŒ์ผ๊ณผ ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ์‹œ ์ด์‹ํ•ด์•ผ ํ•  ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค. + +--- + +## ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ + +``` +mattermost-community-enterprise/ +โ”œโ”€โ”€ enterprise/ # Enterprise ๋ธŒ๋ฆฟ์ง€ (๊ธฐ์กด) +โ”‚ โ””โ”€โ”€ community_imports.go # enterprise-community ์ž„ํฌํŠธ +โ”œโ”€โ”€ enterprise-impl/ # [์‹ ๊ทœ] Enterprise ๊ตฌํ˜„์ฒด +โ”‚ โ”œโ”€โ”€ enterprise.go # ๋ฉ”์ธ ๋“ฑ๋ก ํŒŒ์ผ +โ”‚ โ”œโ”€โ”€ go.mod # ๋ณ„๋„ ๋ชจ๋“ˆ ์ •์˜ +โ”‚ โ”œโ”€โ”€ go.sum +โ”‚ โ”œโ”€โ”€ ldap/ # LDAP ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ saml/ # SAML ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ cluster/ # ํด๋Ÿฌ์Šคํ„ฐ๋ง ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ metrics/ # Prometheus ๋ฉ”ํŠธ๋ฆญ ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ compliance/ # ์ปดํ”Œ๋ผ์ด์–ธ์Šค ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ data_retention/ # ๋ฐ์ดํ„ฐ ๋ณด์กด ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ message_export/ # ๋ฉ”์‹œ์ง€ ๋‚ด๋ณด๋‚ด๊ธฐ ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ account_migration/ # ๊ณ„์ • ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ access_control/ # ์ ‘๊ทผ ์ œ์–ด ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ ip_filtering/ # IP ํ•„ํ„ฐ๋ง ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ notification/ # ์•Œ๋ฆผ ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ oauthproviders/ # OAuth ํ”„๋กœ๋ฐ”์ด๋” ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ outgoing_oauth_connection/ # ์™ธ๋ถ€ OAuth ์—ฐ๊ฒฐ ๊ตฌํ˜„ +โ”‚ โ”œโ”€โ”€ push_proxy/ # ํ‘ธ์‹œ ํ”„๋ก์‹œ ๊ตฌํ˜„ +โ”‚ โ””โ”€โ”€ searchengine/ # ๊ฒ€์ƒ‰ ์—”์ง„ ๊ตฌํ˜„ +โ”œโ”€โ”€ enterprise-community/ # [์‹ ๊ทœ] Enterprise ๋“ฑ๋ก ํŒŒ์ผ +โ”‚ โ”œโ”€โ”€ imports.go # ๋ชจ๋“  ๊ตฌํ˜„์ฒด ์ž„ํฌํŠธ +โ”‚ โ”œโ”€โ”€ ldap/init.go +โ”‚ โ”œโ”€โ”€ saml/init.go +โ”‚ โ”œโ”€โ”€ cluster/init.go +โ”‚ โ”œโ”€โ”€ metrics/init.go +โ”‚ โ”œโ”€โ”€ compliance/init.go +โ”‚ โ”œโ”€โ”€ data_retention/init.go +โ”‚ โ”œโ”€โ”€ message_export/init.go +โ”‚ โ”œโ”€โ”€ account_migration/init.go +โ”‚ โ”œโ”€โ”€ access_control/init.go +โ”‚ โ”œโ”€โ”€ ip_filtering/init.go +โ”‚ โ”œโ”€โ”€ notification/init.go +โ”‚ โ”œโ”€โ”€ outgoing_oauth_connection/init.go +โ”‚ โ”œโ”€โ”€ push_proxy/init.go +โ”‚ โ””โ”€โ”€ searchengine/init.go +โ”œโ”€โ”€ channels/api4/ # [์ˆ˜์ •๋จ] API ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ +โ”‚ โ”œโ”€โ”€ ldap.go +โ”‚ โ”œโ”€โ”€ saml.go +โ”‚ โ”œโ”€โ”€ user.go +โ”‚ โ”œโ”€โ”€ group.go +โ”‚ โ””โ”€โ”€ scheme.go +โ”œโ”€โ”€ channels/app/platform/ # [์ˆ˜์ •๋จ] ๋ฉ”ํŠธ๋ฆญ ํ•ธ๋“ค๋Ÿฌ +โ”‚ โ””โ”€โ”€ metrics.go +โ”œโ”€โ”€ Dockerfile.local # [์‹ ๊ทœ] ๋กœ์ปฌ ๋นŒ๋“œ์šฉ Dockerfile +โ”œโ”€โ”€ Dockerfile.mattermost # [์‹ ๊ทœ] Git ๋นŒ๋“œ์šฉ Dockerfile +โ”œโ”€โ”€ README.md # [์‹ ๊ทœ] ๋นŒ๋“œ ๊ฐ€์ด๋“œ +โ”œโ”€โ”€ Extend-Function.md # [์‹ ๊ทœ] ์ด ๋ฌธ์„œ +โ””โ”€โ”€ Unlock-License.md # [์‹ ๊ทœ] ๋ผ์ด์„ ์Šค ํ•ด์ œ ๋ฌธ์„œ +``` + +--- + +## ์ƒ์„ฑ๋œ ํŒŒ์ผ ์ƒ์„ธ + +### 1. enterprise-impl/ (Enterprise ๊ตฌํ˜„์ฒด) + +#### enterprise-impl/enterprise.go + +Enterprise ๊ธฐ๋Šฅ ๋“ฑ๋ก์„ ์œ„ํ•œ ๋ฉ”์ธ ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. + +```go +package enterprise + +import ( + "github.com/mattermost/mattermost/server/v8/channels/app" + "github.com/mattermost/mattermost/server/v8/enterprise-impl/ldap" + "github.com/mattermost/mattermost/server/v8/enterprise-impl/cluster" + "github.com/mattermost/mattermost/server/v8/enterprise-impl/metrics" + // ... ๊ธฐํƒ€ imports +) + +func init() { + app.RegisterLdapInterface(ldap.New) + app.RegisterClusterInterface(cluster.New) + app.RegisterMetricsInterface(metrics.New) + // ... ๊ธฐํƒ€ ๋“ฑ๋ก +} +``` + +#### enterprise-impl/ldap/ldap.go + +LDAP ์ธ์ฆ ๋ฐ ๋™๊ธฐํ™” ๊ตฌํ˜„์ฒด์ž…๋‹ˆ๋‹ค. + +์ฃผ์š” ๋ฉ”์„œ๋“œ: +- `DoLogin()` - LDAP ๋กœ๊ทธ์ธ ์ฒ˜๋ฆฌ +- `GetUser()` - LDAP์—์„œ ์‚ฌ์šฉ์ž ์กฐํšŒ +- `GetGroup()` - LDAP์—์„œ ๊ทธ๋ฃน ์กฐํšŒ +- `SyncAllUsers()` - ๋ชจ๋“  ์‚ฌ์šฉ์ž ๋™๊ธฐํ™” +- `RunTest()` - LDAP ์—ฐ๊ฒฐ ํ…Œ์ŠคํŠธ + +#### enterprise-impl/cluster/cluster.go + +Redis ๊ธฐ๋ฐ˜ ํด๋Ÿฌ์Šคํ„ฐ๋ง ๊ตฌํ˜„์ฒด์ž…๋‹ˆ๋‹ค. + +์ฃผ์š” ๋ฉ”์„œ๋“œ: +- `StartInterNodeCommunication()` - ๋…ธ๋“œ ๊ฐ„ ํ†ต์‹  ์‹œ์ž‘ +- `RegisterClusterMessageHandler()` - ๋ฉ”์‹œ์ง€ ํ•ธ๋“ค๋Ÿฌ ๋“ฑ๋ก +- `SendClusterMessage()` - ํด๋Ÿฌ์Šคํ„ฐ ๋ฉ”์‹œ์ง€ ์ „์†ก +- `GetClusterStats()` - ํด๋Ÿฌ์Šคํ„ฐ ์ƒํƒœ ์กฐํšŒ + +#### enterprise-impl/metrics/metrics.go + +Prometheus ๋ฉ”ํŠธ๋ฆญ ์ˆ˜์ง‘ ๊ตฌํ˜„์ฒด์ž…๋‹ˆ๋‹ค. + +์ฃผ์š” ๋ฉ”์„œ๋“œ: +- `Register()` - ๋ฉ”ํŠธ๋ฆญ ๋“ฑ๋ก +- `Handler()` - HTTP ํ•ธ๋“ค๋Ÿฌ ๋ฐ˜ํ™˜ +- `IncrementHTTPRequest()` - HTTP ์š”์ฒญ ์นด์šดํŠธ +- `ObserveAPIEndpointDuration()` - API ์‘๋‹ต ์‹œ๊ฐ„ ์ธก์ • + +### 2. enterprise-community/ (๋“ฑ๋ก ํŒŒ์ผ) + +#### enterprise-community/imports.go + +๋ชจ๋“  Enterprise ๊ตฌํ˜„์ฒด๋ฅผ ์ž„ํฌํŠธํ•˜์—ฌ init()์ด ์‹คํ–‰๋˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค. + +```go +package enterprise_community + +import ( + _ "github.com/mattermost/mattermost/server/v8/enterprise-community/ldap" + _ "github.com/mattermost/mattermost/server/v8/enterprise-community/cluster" + _ "github.com/mattermost/mattermost/server/v8/enterprise-community/metrics" + // ... ๊ธฐํƒ€ imports +) +``` + +#### enterprise-community/ldap/init.go + +LDAP ๊ตฌํ˜„์ฒด๋ฅผ app์— ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. + +```go +package ldap + +import ( + "github.com/mattermost/mattermost/server/v8/channels/app" + ldapImpl "github.com/mattermost/mattermost/server/v8/enterprise-impl/ldap" +) + +func init() { + app.RegisterLdapInterface(ldapImpl.New) +} +``` + +### 3. ์ˆ˜์ •๋œ ํŒŒ์ผ + +#### channels/api4/ldap.go + +LDAP ๊ด€๋ จ API์—์„œ ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ: +- `syncLdap()` - LDAP ๋™๊ธฐํ™” +- `testLdap()` - LDAP ์—ฐ๊ฒฐ ํ…Œ์ŠคํŠธ +- `getLdapGroups()` - LDAP ๊ทธ๋ฃน ์กฐํšŒ +- `linkLdapGroup()` - LDAP ๊ทธ๋ฃน ์—ฐ๊ฒฐ +- `unlinkLdapGroup()` - LDAP ๊ทธ๋ฃน ์—ฐ๊ฒฐ ํ•ด์ œ +- `migrateIdLdap()` - LDAP ID ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ +- `createLdapPublicCertificate()` - ์ธ์ฆ์„œ ์ƒ์„ฑ + +#### channels/api4/scheme.go + +์ปค์Šคํ…€ ๊ถŒํ•œ ์Šคํ‚ค๋งˆ API์—์„œ ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ: +- `createScheme()` - ์Šคํ‚ค๋งˆ ์ƒ์„ฑ +- `patchScheme()` - ์Šคํ‚ค๋งˆ ์ˆ˜์ • +- `deleteScheme()` - ์Šคํ‚ค๋งˆ ์‚ญ์ œ + +#### channels/api4/group.go + +๊ทธ๋ฃน ๊ด€๋ จ API์—์„œ ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ: +- `getGroupsByTeam()` - ํŒ€๋ณ„ ๊ทธ๋ฃน ์กฐํšŒ +- `getGroupsByChannel()` - ์ฑ„๋„๋ณ„ ๊ทธ๋ฃน ์กฐํšŒ + +#### channels/api4/user.go + +์‚ฌ์šฉ์ž ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ API์—์„œ ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ: +- `migrateAuthToLdap()` - LDAP ์ธ์ฆ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ +- `migrateAuthToSaml()` - SAML ์ธ์ฆ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ + +#### channels/app/platform/metrics.go + +๋ฉ”ํŠธ๋ฆญ ๋ผ์šฐํ„ฐ์— `/metrics` ํ•ธ๋“ค๋Ÿฌ ๋“ฑ๋ก ์ถ”๊ฐ€: + +```go +// MetricsHandlerProvider ์ธํ„ฐํŽ˜์ด์Šค ์ถ”๊ฐ€ +type MetricsHandlerProvider interface { + Handler() http.Handler +} + +// initMetricsRouter()์— ํ•ธ๋“ค๋Ÿฌ ๋“ฑ๋ก ์ฝ”๋“œ ์ถ”๊ฐ€ +if pm.metricsImpl != nil { + if handlerProvider, ok := pm.metricsImpl.(MetricsHandlerProvider); ok { + pm.router.Handle("/metrics", handlerProvider.Handler()) + } +} +``` + +--- + +## ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ๊ฐ€์ด๋“œ + +Mattermost ์ƒˆ ๋ฒ„์ „์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•  ๋•Œ ๋‹ค์Œ ํŒŒ์ผ๋“ค์„ ์ด์‹ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. + +### ํ•„์ˆ˜ ์ด์‹ ํŒŒ์ผ + +1. **enterprise-impl/ ์ „์ฒด ๋””๋ ‰ํ† ๋ฆฌ** + - ์ƒˆ ๋ฒ„์ „์˜ einterfaces์— ๋งž๊ฒŒ ์ˆ˜์ • ํ•„์š” + - ์ธํ„ฐํŽ˜์ด์Šค ๋ณ€๊ฒฝ ์‹œ ๊ตฌํ˜„์ฒด ์—…๋ฐ์ดํŠธ + +2. **enterprise-community/ ์ „์ฒด ๋””๋ ‰ํ† ๋ฆฌ** + - ์ƒˆ๋กœ์šด Enterprise ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ์‹œ init ํŒŒ์ผ ์ถ”๊ฐ€ + - app ํŒจํ‚ค์ง€ ๊ฒฝ๋กœ ๋ณ€๊ฒฝ ์‹œ import ์ˆ˜์ • + +3. **enterprise/community_imports.go** + - enterprise-community ํŒจํ‚ค์ง€ ์ž„ํฌํŠธ ์œ ์ง€ + +### API ๋ผ์ด์„ ์Šค ์ฒดํฌ ์žฌ์ œ๊ฑฐ + +์ƒˆ ๋ฒ„์ „์—์„œ ๋‹ค์Œ ํŒŒ์ผ๋“ค์˜ ๋ผ์ด์„ ์Šค ์ฒดํฌ๋ฅผ ๋‹ค์‹œ ์ œ๊ฑฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค: + +1. **channels/api4/ldap.go** + - `c.App.Channels().License() == nil` ์กฐ๊ฑด๋ฌธ ์ฐพ์•„์„œ ์ œ๊ฑฐ + - `!*c.App.Channels().License().Features.LDAP` ์กฐ๊ฑด ์ œ๊ฑฐ + +2. **channels/api4/scheme.go** + - `!*c.App.Channels().License().Features.CustomPermissionsSchemes` ์กฐ๊ฑด ์ œ๊ฑฐ + +3. **channels/api4/group.go** + - `!*c.App.Channels().License().Features.LDAPGroups` ์กฐ๊ฑด ์ œ๊ฑฐ + +4. **channels/api4/user.go** + - LDAP/SAML ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ + +5. **channels/app/platform/metrics.go** + - `MetricsHandlerProvider` ์ธํ„ฐํŽ˜์ด์Šค ์ถ”๊ฐ€ + - `/metrics` ํ•ธ๋“ค๋Ÿฌ ๋“ฑ๋ก ์ฝ”๋“œ ์ถ”๊ฐ€ + +### ์ด์‹ ์Šคํฌ๋ฆฝํŠธ ์˜ˆ์‹œ + +```bash +#!/bin/bash +# upgrade-mattermost.sh + +NEW_VERSION=$1 +OLD_DIR="mattermost-community-enterprise" +NEW_DIR="mattermost-server-$NEW_VERSION" + +# 1. ์ƒˆ ๋ฒ„์ „ ๋‹ค์šด๋กœ๋“œ +git clone https://github.com/mattermost/mattermost.git $NEW_DIR +cd $NEW_DIR/server + +# 2. Enterprise ๊ตฌํ˜„์ฒด ๋ณต์‚ฌ +cp -r $OLD_DIR/enterprise-impl ./ +cp -r $OLD_DIR/enterprise-community ./ + +# 3. community_imports.go ๋ณต์‚ฌ +cp $OLD_DIR/enterprise/community_imports.go ./enterprise/ + +# 4. go.mod ์—…๋ฐ์ดํŠธ (enterprise-impl ์ถ”๊ฐ€) +echo 'replace github.com/mattermost/mattermost/server/v8/enterprise-impl => ./enterprise-impl' >> go.mod + +# 5. vendor ์—…๋ฐ์ดํŠธ +go mod vendor + +echo "์ด์ œ API ํŒŒ์ผ์—์„œ ๋ผ์ด์„ ์Šค ์ฒดํฌ๋ฅผ ์ˆ˜๋™์œผ๋กœ ์ œ๊ฑฐํ•˜์„ธ์š”" +``` + +### ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ž๋™ ์ œ๊ฑฐ ์Šคํฌ๋ฆฝํŠธ + +```bash +#!/bin/bash +# remove-license-checks.sh + +# LDAP ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ +sed -i '/c\.App\.Channels()\.License() == nil.*LDAP/d' channels/api4/ldap.go +sed -i '/!.*License()\.Features\.LDAP/d' channels/api4/ldap.go + +# Scheme ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ +sed -i '/License()\.Features\.CustomPermissionsSchemes/d' channels/api4/scheme.go + +# Group ๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ +sed -i '/License()\.Features\.LDAPGroups/d' channels/api4/group.go + +echo "๋ผ์ด์„ ์Šค ์ฒดํฌ ์ œ๊ฑฐ ์™„๋ฃŒ. ๋นŒ๋“œ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”." +``` + +--- + +## einterfaces ๋งคํ•‘ + +| ์ธํ„ฐํŽ˜์ด์Šค | ๊ตฌํ˜„ ํŒŒ์ผ | ๋“ฑ๋ก ํ•จ์ˆ˜ | +|-----------|----------|----------| +| LdapInterface | enterprise-impl/ldap/ldap.go | app.RegisterLdapInterface | +| SamlInterface | enterprise-impl/saml/saml.go | app.RegisterSamlInterface | +| ClusterInterface | enterprise-impl/cluster/cluster.go | app.RegisterClusterInterface | +| MetricsInterface | enterprise-impl/metrics/metrics.go | app.RegisterMetricsInterface | +| ComplianceInterface | enterprise-impl/compliance/compliance.go | app.RegisterComplianceInterface | +| DataRetentionInterface | enterprise-impl/data_retention/data_retention.go | app.RegisterDataRetentionInterface | +| MessageExportInterface | enterprise-impl/message_export/message_export.go | app.RegisterMessageExportInterface | +| AccountMigrationInterface | enterprise-impl/account_migration/account_migration.go | app.RegisterAccountMigrationInterface | + +--- + +## ์ฃผ์˜์‚ฌํ•ญ + +1. **UI ๋ผ์ด์„ ์Šค ์ฒดํฌ**: ์›น ํด๋ผ์ด์–ธํŠธ(client/ ๋””๋ ‰ํ† ๋ฆฌ)์—๋„ ๋ผ์ด์„ ์Šค ์ฒดํฌ๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. JavaScript ํŒŒ์ผ์€ minified ์ƒํƒœ๋ผ ์ˆ˜์ •์ด ์–ด๋ ต์Šต๋‹ˆ๋‹ค. + +2. **๋ฒ„์ „ ํ˜ธํ™˜์„ฑ**: ์ด ๊ตฌํ˜„์ฒด๋Š” Mattermost v9.x๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฉ”์ด์ € ๋ฒ„์ „์ด ๋ณ€๊ฒฝ๋˜๋ฉด ์ธํ„ฐํŽ˜์ด์Šค ์‹œ๊ทธ๋‹ˆ์ฒ˜๊ฐ€ ๋‹ฌ๋ผ์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +3. **ํ…Œ์ŠคํŠธ**: ์—…๊ทธ๋ ˆ์ด๋“œ ํ›„ ๋ฐ˜๋“œ์‹œ ๋ชจ๋“  Enterprise ๊ธฐ๋Šฅ์„ ํ…Œ์ŠคํŠธํ•˜์„ธ์š”: + - LDAP ๋กœ๊ทธ์ธ + - ํด๋Ÿฌ์Šคํ„ฐ ๋™๊ธฐํ™” + - Prometheus ๋ฉ”ํŠธ๋ฆญ (/metrics ์—”๋“œํฌ์ธํŠธ) + - ์ปค์Šคํ…€ ๊ถŒํ•œ ์Šคํ‚ค๋งˆ ์ƒ์„ฑ/์ˆ˜์ • + +4. **์ƒ์šฉ ์‚ฌ์šฉ**: ์ด ํ”„๋กœ์ ํŠธ๋Š” ํ•™์Šต ๋ฐ ๊ฐœ์ธ ์‚ฌ์šฉ ๋ชฉ์ ์ž…๋‹ˆ๋‹ค. ์ƒ์šฉ ํ™˜๊ฒฝ์—์„œ๋Š” Mattermost ๊ณต์‹ ๋ผ์ด์„ ์Šค๋ฅผ ๊ตฌ๋งคํ•˜์„ธ์š”. diff --git a/README.md b/README.md new file mode 100644 index 00000000..80038fdf --- /dev/null +++ b/README.md @@ -0,0 +1,328 @@ +# Mattermost Community Enterprise + +๋ผ์ด์„ ์Šค ์—†์ด Enterprise ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” Mattermost ์˜คํ”ˆ์†Œ์Šค ๋นŒ๋“œ์ž…๋‹ˆ๋‹ค. + +## ์‹œ์Šคํ…œ ์š”๊ตฌ์‚ฌํ•ญ + +- **OS**: Rocky Linux 9 / CentOS 9 / RHEL 9 (๊ถŒ์žฅ) ๋˜๋Š” Ubuntu 22.04+ +- **CPU**: ์ตœ์†Œ 2 Core +- **RAM**: ์ตœ์†Œ 2GB (๊ถŒ์žฅ 4GB) +- **๋””์Šคํฌ**: ์ตœ์†Œ 20GB +- **๋„คํŠธ์›Œํฌ**: ์ธํ„ฐ๋„ท ์—ฐ๊ฒฐ ํ•„์š” (๋นŒ๋“œ ์‹œ) + +## ๋น ๋ฅธ ์‹œ์ž‘ (Docker ์‚ฌ์šฉ) + +### 1. ์†Œ์Šค ์ฝ”๋“œ ๋ฐ›๊ธฐ + +```bash +git clone http://10.0.4.213:3000/claude/mattermost-community-enterprise.git +cd mattermost-community-enterprise +``` + +### 2. Docker ์ด๋ฏธ์ง€ ๋นŒ๋“œ + +```bash +# ๋กœ์ปฌ ์†Œ์Šค๋กœ ๋นŒ๋“œ (๊ถŒ์žฅ) +docker build -f Dockerfile.local -t mattermost-community:latest . + +# ๋˜๋Š” Git์—์„œ ์ง์ ‘ ๋นŒ๋“œ (๋„คํŠธ์›Œํฌ ํ•„์š”) +docker build -f Dockerfile.mattermost -t mattermost-community:latest . +``` + +### 3. Docker Compose๋กœ ์‹คํ–‰ + +```bash +# docker-compose.yml ํŒŒ์ผ ์ƒ์„ฑ (์•„๋ž˜ ๋‚ด์šฉ ์ฐธ๊ณ ) +docker compose up -d +``` + +**docker-compose.yml ์˜ˆ์‹œ:** + +```yaml +version: '3.8' +services: + postgres: + image: postgres:15 + environment: + POSTGRES_DB: mattermost + POSTGRES_USER: mmuser + POSTGRES_PASSWORD: mmpassword + volumes: + - postgres_data:/var/lib/postgresql/data + restart: unless-stopped + + mattermost: + image: mattermost-community:latest + depends_on: + - postgres + ports: + - "8065:8065" + environment: + MM_SQLSETTINGS_DRIVERNAME: postgres + MM_SQLSETTINGS_DATASOURCE: postgres://mmuser:mmpassword@postgres:5432/mattermost?sslmode=disable + volumes: + - mattermost_data:/mattermost/data + - mattermost_logs:/mattermost/logs + - mattermost_plugins:/mattermost/plugins + restart: unless-stopped + +volumes: + postgres_data: + mattermost_data: + mattermost_logs: + mattermost_plugins: +``` + +### 4. ์ ‘์† + +๋ธŒ๋ผ์šฐ์ €์—์„œ `http://์„œ๋ฒ„IP:8065` ๋กœ ์ ‘์†ํ•ฉ๋‹ˆ๋‹ค. + +--- + +## ์ˆ˜๋™ ๋นŒ๋“œ (Docker ์—†์ด) + +### 1. ์˜์กด์„ฑ ์„ค์น˜ + +**Rocky Linux / CentOS 9:** + +```bash +sudo dnf install -y git golang make gcc +``` + +**Ubuntu 22.04:** + +```bash +sudo apt update +sudo apt install -y git golang-go make gcc +``` + +### 2. Go ๋ฒ„์ „ ํ™•์ธ + +Go 1.21 ์ด์ƒ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. + +```bash +go version +# go version go1.21.x linux/amd64 +``` + +Go ๋ฒ„์ „์ด ๋‚ฎ์œผ๋ฉด ์ตœ์‹  ๋ฒ„์ „์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค: + +```bash +# Rocky Linux +sudo dnf module enable go-toolset:rhel9 +sudo dnf install -y go-toolset + +# ๋˜๋Š” ์ง์ ‘ ์„ค์น˜ +wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz +export PATH=$PATH:/usr/local/go/bin +``` + +### 3. ์†Œ์Šค ์ฝ”๋“œ ๋ฐ›๊ธฐ + +```bash +git clone http://10.0.4.213:3000/claude/mattermost-community-enterprise.git +cd mattermost-community-enterprise +``` + +### 4. ๋นŒ๋“œ + +```bash +# vendor ๋””๋ ‰ํ† ๋ฆฌ ์‚ฌ์šฉ (์˜คํ”„๋ผ์ธ/์—์–ด๊ฐญ ํ™˜๊ฒฝ) +go build -v -mod=vendor -o mattermost ./cmd/mattermost + +# ๋˜๋Š” ์˜จ๋ผ์ธ ํ™˜๊ฒฝ์—์„œ ์ตœ์‹  ์˜์กด์„ฑ ์‚ฌ์šฉ +go mod download +go build -v -o mattermost ./cmd/mattermost +``` + +### 5. ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ ์ค€๋น„ + +```bash +mkdir -p /opt/mattermost/{bin,config,data,logs,plugins,client/plugins} + +# ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ณต์‚ฌ +cp mattermost /opt/mattermost/bin/ + +# ์„ค์ • ๋ฐ ๋ฆฌ์†Œ์Šค ๋ณต์‚ฌ +cp -r config/* /opt/mattermost/config/ +cp -r i18n /opt/mattermost/ +cp -r fonts /opt/mattermost/ +cp -r templates /opt/mattermost/ +cp -r client/* /opt/mattermost/client/ +``` + +### 6. ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ค์ • + +**PostgreSQL ์„ค์น˜ ๋ฐ ์„ค์ •:** + +```bash +# PostgreSQL ์„ค์น˜ +sudo dnf install -y postgresql-server postgresql +sudo postgresql-setup --initdb +sudo systemctl enable --now postgresql + +# ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ƒ์„ฑ +sudo -u postgres psql <