jasl8r / docker-mattermost Goto Github PK
View Code? Open in Web Editor NEWDocker solution for mattermost
License: MIT License
Docker solution for mattermost
License: MIT License
Hi @jasl8r ,
It's me again :) When do you plan on releasing the version 3.7.2 of Mattermost ?
Can I help you by any mean ?
Thanks in advance
CyD
At least with Mattermost 2.1.0 (and 2.2.0 I forked repo and tested) the final config file inside container seems to cause problems, at least I can't get container to run. Using the docker-compose method. At startup the container woes:
mattermost_1 | Configuring mattermost database....
mattermost_1 | Configuring nginx...
mattermost_1 | 2016-04-18 13:34:24,100 CRIT Supervisor running as root (no user in config file)
mattermost_1 | 2016-04-18 13:34:24,101 WARN Included extra file "/etc/supervisor/conf.d/mattermost.conf" during parsing
mattermost_1 | 2016-04-18 13:34:24,101 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
mattermost_1 | 2016-04-18 13:34:24,119 INFO RPC interface 'supervisor' initialized
mattermost_1 | 2016-04-18 13:34:24,119 CRIT Server 'unix_http_server' running without any HTTP authentication checking
mattermost_1 | 2016-04-18 13:34:24,119 INFO supervisord started with pid 1
mattermost_1 | 2016-04-18 13:34:25,122 INFO spawned: 'mattermost' with pid 104
mattermost_1 | 2016-04-18 13:34:25,123 INFO spawned: 'nginx' with pid 105
mattermost_1 | 2016-04-18 13:34:25,166 INFO exited: mattermost (exit status 2; not expected)
mattermost_1 | 2016-04-18 13:34:26,169 INFO spawned: 'mattermost' with pid 115
mattermost_1 | 2016-04-18 13:34:26,169 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
mattermost_1 | 2016-04-18 13:34:26,203 INFO exited: mattermost (exit status 2; not expected)
mattermost_1 | 2016-04-18 13:34:28,210 INFO spawned: 'mattermost' with pid 121
mattermost_1 | 2016-04-18 13:34:28,245 INFO exited: mattermost (exit status 2; not expected)
mattermost_1 | 2016-04-18 13:34:31,251 INFO spawned: 'mattermost' with pid 128
mattermost_1 | 2016-04-18 13:34:31,290 INFO exited: mattermost (exit status 2; not expected)
mattermost_1 | 2016-04-18 13:34:32,292 INFO gave up: mattermost entered FATAL state, too many start retries too quickly
When investigating inside container, I get following (not very informative) output:
root@e95326544a87:/opt/mattermost/mattermost# /opt/mattermost/mattermost/bin/platform -config /opt/mattermost/config/config.json [20/1331]
panic: Error validating config file=/opt/mattermost/config/config.json, err=
goroutine 1 [running]:
github.com/mattermost/platform/utils.LoadConfig(0x7fff3eb5b63a, 0x22)
/go/src/github.com/mattermost/platform/utils/config.go:167 +0xd66
main.main()
/go/src/github.com/mattermost/platform/mattermost.go:55 +0x48
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1721 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x37
goroutine 6 [runnable]:
syscall.Syscall(0x0, 0x4, 0xc8202be8f0, 0x1000, 0x76, 0x1000, 0x0)
/usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x4, 0xc8202be8f0, 0x1000, 0x1000, 0x4f9be2, 0x0, 0x0)
/usr/local/go/src/syscall/zsyscall_linux_amd64.go:783 +0x5f
syscall.Read(0x4, 0xc8202be8f0, 0x1000, 0x1000, 0x4, 0x0, 0x0)
/usr/local/go/src/syscall/syscall_unix.go:160 +0x4d
time.readFile(0xcc86c0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/time/sys_unix.go:34 +0x19b
time.loadZoneFile(0x0, 0x0, 0xcc86c0, 0xe, 0x0, 0x0, 0x0)
Which seems to refer to some problem in parsing the config file. I'm using the easiest way possible, running from docker-compose.yml.
The generated config is as follows:
{
"ServiceSettings": {
"ListenAddress": ":8080",
"MaximumLoginAttempts": 10,
"SegmentDeveloperKey": "",
"GoogleDeveloperKey": "",
"EnableOAuthServiceProvider": false,
"EnableIncomingWebhooks": false,
"EnableOutgoingWebhooks": false,
"EnableCommands": false,
"EnableOnlyAdminIntegrations": true,
"EnablePostUsernameOverride": false,
"EnablePostIconOverride": false,
"EnableTesting": false,
"EnableDeveloper": false,
"EnableSecurityFixAlert": true,
"EnableInsecureOutgoingConnections": false,
"AllowCorsFrom": "",
"SessionLengthWebInDays": 30,
"SessionLengthMobileInDays": 30,
"SessionLengthSSOInDays": 30,
"SessionCacheInMinutes": 10
},
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 50,
"EnableTeamCreation": true,
"EnableUserCreation": true,
"RestrictCreationToDomains": "",
"RestrictTeamNames": true,
"EnableTeamListing": false
},
"SqlSettings": {
"DriverName": "mysql",
"DataSource": "mattermost:password@tcp(172.17.0.1:3306)/mattermost?charset=utf8mb4,utf8",
"DataSourceReplicas": [],
"MaxIdleConns": 10,
"MaxOpenConns": 10,
"Trace": false,
"AtRestEncryptKey": "crpXCPNxW7f74szRfr7vgpvbPTtFX3btxRwTKfPLJTMMrTsqXpTpvTFp4JfJnThz"
},
"LogSettings": {
"EnableConsole": false,
"ConsoleLevel": "INFO",
"EnableFile": true,
"FileLevel": "INFO",
"FileFormat": "",
"FileLocation": "/var/log/mattermost/mattermost.log"
},
"FileSettings": {
"DriverName": "local",
"Directory": "/opt/mattermost/data",
"EnablePublicLink": true,
"PublicLinkSalt": "crpXCPNxW7f74szRfr7vgpvbPTtFX3btxRwTKfPLJTMMrTsqXpTpvTFp4JfJnThz",
"ThumbnailWidth": 120,
"ThumbnailHeight": 100,
"PreviewWidth": 1024,
"PreviewHeight": 0,
"ProfileWidth": 128,
"ProfileHeight": 128,
"InitialFont": "luximbi.ttf",
"AmazonS3AccessKeyId": "",
"AmazonS3SecretAccessKey": "",
"AmazonS3Bucket": "",
"AmazonS3Region": "",
"AmazonS3Endpoint": "",
"AmazonS3BucketEndpoint": "",
"AmazonS3LocationConstraint": false,
"AmazonS3LowercaseBucket": false
},
"EmailSettings": {
"EnableSignUpWithEmail": true,
"ConnectionSecurity": "{{SMTP_SECURITY}}",
"InviteSalt": "crpXCPNxW7f74szRfr7vgpvbPTtFX3btxRwTKfPLJTMMrTsqXpTpvTFp4JfJnThz",
"PasswordResetSalt": "crpXCPNxW7f74szRfr7vgpvbPTtFX3btxRwTKfPLJTMMrTsqXpTpvTFp4JfJnThz",
"SendPushNotifications": false,
"PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
"PerSec": 10,
"MemoryStoreSize": 10000,
"VaryByRemoteAddr": true,
"VaryByHeader": ":-"
},
"PrivacySettings": {
"ShowEmailAddress": true,
"ShowFullName": true
},
"SupportSettings": {
"TermsOfServiceLink": "/static/help/terms.html",
"PrivacyPolicyLink": "/static/help/privacy.html",
"AboutLink": "/static/help/about.html",
"HelpLink": "/static/help/help.html",
"ReportAProblemLink": "/static/help/report_problem.html",
"SupportEmail": "{{MATTERMOST_SUPPORT_EMAIL}}"
}
}
I'm also trying to figure this out, but just wanted you to know :) Looks like the most comprehensive mattermost docker image I've yet found :)
Mattermost does not support multiple application instances and a load balancer should not be used for such purposes.
Request in Mattermost dev channel
I don't know whether this is related to this docker image in particular or to mm in general. My installation looses parts of its settings from time to time, which I need to reconfigure via System Console if that happens.
Didn't find any related error messages.
Any idea?
Hello @jasl8r,
Thanks a lot for version 3.4 !
I was wondering how we could delete teams within the docker containers, it looks like the sql connection toward an external postgresql container isn't working.
bash-4.3# ./platform
[2016/10/26 08:57:42 UTC] [INFO] Loaded system translations for 'en' from '/opt/mattermost/mattermost/i18n/en.json'
[2016/10/26 08:57:42 UTC] [INFO] Current version is 3.4.0 (3.4.0/Wed Oct 26 04:02:27 UTC 2016/57f25fa59c71821cc38fd220b133aa6a40815e12/none)
[2016/10/26 08:57:42 UTC] [INFO] Enterprise Enabled: false
[2016/10/26 08:57:42 UTC] [INFO] Current working directory is /opt/mattermost/mattermost/bin
[2016/10/26 08:57:42 UTC] [INFO] Loaded config file from /opt/mattermost/mattermost/config/config.json
[2016/10/26 08:57:42 UTC] [INFO] Server is initializing...
[2016/10/26 08:57:42 UTC] [INFO] Pinging sql master database
[2016/10/26 08:57:42 UTC] [CRIT] Failed to ping db err:dial tcp: lookup dockerhost on 10.0.2.3:53: no such host
How could we do ?
Thanks in advance.
Cyrille
It would be great to also be able to configure LDAP with environment variables
How could we use an external idp with this image ?
Could we reuse environment variables ?
Thanks in advance
Cyrille
I'm getting the below. This seems to be the solution, though I think that needs to be done in the docker file build?
Also, there doesn't seem to be a way to persist the config, unless that's the data volume you mention - which is possibly just because the above error causes my docker to crash before it can write it. Thought I'd check here in case you can shed any light. The below is my full log, very short so very easy!
Initializing mattermost...
Initializing datadir...
Initializing logdir...
Installing configuration templates...
Configuring mattermost...
Configuring mattermost database...
Configuring SMTP...
Configuring GitLab...
[MySQL] 2020/04/07 05:37:14 packets.go:32: EOF
[MySQL] 2020/04/07 05:37:14 packets.go:32: EOF
[MySQL] 2020/04/07 05:37:14 packets.go:32: EOF
I'm guessing that I can just disable gitlab if I don't need it, or create an account and maybe that resolves this issue - any idea what docker variable disables gitlab?
after docker-compose up
it shows this error
Unable to load mattermost configuration file: Error validating config file=/opt/mattermost/config/config.json
Hello @jasl8r !
Do you intend to build a docker image for mattermost 3.4 by any chance ?
May I help ?
Thanks a lot for bringing this.
Cyrille
I'm not sure if this is an issue or not. When SMTP is configured, it is not sending the hostname and the SMTP server is rejecting on helo ("Helo command rejected: need fully-qualified hostname;..."). Im using the latest docker container and using the --hostname argument. If exec into the image, the hostname is correct.
It would be very convenient to support this feature.
Upgrade from 2.2.0 to 3.4.0 causes the mattermost container to exit at step:
+ [[ 3.4.0 != 3.4.0 ]]
+ echo 3.4.0
+ ./bin/platform -config /opt/mattermost/config/config.json
<container exits>
Upgrade to 3.1.0 however worked seamlessly. During the same time the linked mysql container reports "Got an error reading communication packets" for user mattermost.
Hi @jasl8r !
I'd like to upgrade to Mattermost 4.5 (https://docs.mattermost.com/administration/changelog.html).
I'm going to try upgrading your repo, would you have any advice, or time to help, it would be great.
Thanks
i'm currently trying to troubleshoot why a mattermost container doesn't send mails. but i'm kinda blindfolded here as it doesn't log anything. this is the output i get with docker-compose logs
:
mattermost_1 | Initializing mattermost...
mattermost_1 | Initializing datadir...
mattermost_1 | Initializing logdir...
mattermost_1 | Installing configuration templates...
mattermost_1 | Configuring mattermost...
mattermost_1 | Configuring mattermost database...
mattermost_1 | Configuring SMTP...
mattermost_1 | Configuring GitLab..
mattermost_1 | Configuring new Mattermost installation...
this is only followed by a series of postgres messages like this:
postgres_1 | ERROR: relation "systems" does not exist at character 19
postgres_1 | STATEMENT: SELECT Value FROM Systems WHERE Name='Version'
postgres_1 | ERROR: relation "idx_teams_name" does not exist
postgres_1 | STATEMENT: SELECT $1::regclass
i can interact with the webinterface so far that i can create the initial user, but i don't receive an email and there is nothing logged by the mattermost container.
is there a way to raise the logging verbosity?
Hi @jasl8r !
Do you plan to upgrade your docker image to 3.10.0 ?
It would be great :)
Thanks in advance
Cyrille
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.