Created
March 24, 2016 20:15
-
-
Save nicolai86/904e225fa8148093b489 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mattermost database settings | |
postgresql_database: mattermost | |
postgresql_username: mmuser | |
postgresql_password: Lnj9U8dsMCLjjxgcdL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443; | |
server_name chat.example.com; | |
return 301 http://chat.example.com; | |
} | |
server { | |
listen 80; | |
server_name chat.examaple.com; | |
root /home/mattermost/mattermost; | |
location / { | |
client_max_body_size 50M; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Frame-Options SAMEORIGIN; | |
proxy_pass http://127.0.0.1:8065; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
- postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
sudo: true | |
roles: | |
- role: mattermost | |
tags: mattermost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- postgresql_db: | |
name: "{{ postgresql_database }}" | |
state: present | |
encoding: utf8 | |
sudo_user: postgres | |
- postgresql_user: | |
name: "{{ postgresql_username }}" | |
password: "{{ postgresql_password }}" | |
role_attr_flags: "CREATEDB,NOSUPERUSER" | |
db: "{{ postgresql_database }}" | |
priv: 'all' | |
sudo_user: postgres | |
- user: | |
name: mattermost | |
comment: Mattermost | |
home: /home/mattermost | |
createhome: yes | |
shell: /bin/bash | |
- get_url: | |
url: "https://github.com/mattermost/platform/releases/download/v1.0.0/mattermost.tar.gz" | |
dest: /home/mattermost | |
tags: update | |
register: mattermost_download | |
- unarchive: | |
copy: no | |
src: "{{ mattermost_download.dest }}" | |
dest: /home/mattermost | |
tags: update | |
when: mattermost_download|changed | |
- file: | |
path: /home/mattermost/mattermost | |
owner: mattermost | |
group: mattermost | |
recurse: yes | |
tags: update | |
- template: | |
src: config.json.j2 | |
dest: /home/mattermost/mattermost/config/config.json | |
owner: mattermost | |
group: mattermost | |
tags: update | |
- template: | |
src: mattermost.conf.j2 | |
dest: /etc/init/mattermost.conf | |
mode: 644 | |
tags: update | |
- service: | |
name: mattermost | |
state: started | |
enabled: yes | |
- copy: | |
src: chat.example.com | |
dest: /etc/nginx/sites-enabled/chat.example.com | |
owner: root | |
group: root | |
- service: | |
name: mattermost | |
state: restarted | |
tags: update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ServiceSettings": { | |
"ListenAddress": ":8065", | |
"MaximumLoginAttempts": 10, | |
"SegmentDeveloperKey": "", | |
"GoogleDeveloperKey": "", | |
"EnableOAuthServiceProvider": false, | |
"EnableIncomingWebhooks": false, | |
"EnableTesting": false | |
}, | |
"TeamSettings": { | |
"SiteName": "example.com", | |
"MaxUsersPerTeam": 10, | |
"EnableTeamCreation": false, | |
"EnableUserCreation": true, | |
"RestrictCreationToDomains": "" | |
}, | |
"SqlSettings": { | |
"DriverName": "postgres", | |
"DataSource": "postgres://{{ postgresql_username }}:{{ postgresql_password }}@127.0.0.1:5432/{{ postgresql_database }}?sslmode=disable&connect_timeout=10", | |
"DataSourceReplicas": [], | |
"MaxIdleConns": 5, | |
"MaxOpenConns": 5, | |
"Trace": false, | |
"AtRestEncryptKey": "f0pnCQe8r8gxRE3hwXMl1Q6xFOrI5Bq9" | |
}, | |
"LogSettings": { | |
"EnableConsole": true, | |
"ConsoleLevel": "DEBUG", | |
"EnableFile": true, | |
"FileLevel": "INFO", | |
"FileFormat": "", | |
"FileLocation": "" | |
}, | |
"FileSettings": { | |
"DriverName": "local", | |
"Directory": "./data/", | |
"EnablePublicLink": true, | |
"PublicLinkSalt": "gqMgTARQripeHN4eEsuSbYhRjOIMHwp2", | |
"ThumbnailWidth": 120, | |
"ThumbnailHeight": 100, | |
"PreviewWidth": 1024, | |
"PreviewHeight": 0, | |
"ProfileWidth": 128, | |
"ProfileHeight": 128, | |
"InitialFont": "luximbi.ttf", | |
"AmazonS3AccessKeyId": "", | |
"AmazonS3SecretAccessKey": "", | |
"AmazonS3Bucket": "", | |
"AmazonS3Region": "" | |
}, | |
"EmailSettings": { | |
"EnableSignUpWithEmail": true, | |
"SendEmailNotifications": false, | |
"RequireEmailVerification": false, | |
"FeedbackName": "", | |
"FeedbackEmail": "", | |
"SMTPUsername": "", | |
"SMTPPassword": "", | |
"SMTPServer": "", | |
"SMTPPort": "", | |
"ConnectionSecurity": "", | |
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS", | |
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL", | |
"ApplePushServer": "", | |
"ApplePushCertPublic": "", | |
"ApplePushCertPrivate": "" | |
}, | |
"RateLimitSettings": { | |
"EnableRateLimiter": true, | |
"PerSec": 10, | |
"MemoryStoreSize": 10000, | |
"VaryByRemoteAddr": true, | |
"VaryByHeader": "" | |
}, | |
"PrivacySettings": { | |
"ShowEmailAddress": true, | |
"ShowFullName": true | |
}, | |
"GitLabSettings": { | |
"Enable": false, | |
"Secret": "", | |
"Id": "", | |
"Scope": "", | |
"AuthEndpoint": "", | |
"TokenEndpoint": "", | |
"UserApiEndpoint": "" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "mattermost chat service" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
respawn | |
chdir /home/mattermost/mattermost | |
setuid mattermost | |
setgid mattermost | |
exec bin/platform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment