Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
klizhentas committed Nov 23, 2016
1 parent 2159605 commit 3154ce0
Show file tree
Hide file tree
Showing 14 changed files with 1,291 additions and 2 deletions.
1,017 changes: 1,015 additions & 2 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server {
listen 80;
server_name localhost;

location / {
return 200 'hello, Kubernetes!';
}
}
Binary file added img/macos-docker-settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/mattermost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions mattermost/postgres-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# service that routes to database
apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app: mattermost
role: mattermost-database
spec:
type: NodePort
ports:
- port: 5432
selector:
role: mattermost-database
14 changes: 14 additions & 0 deletions mattermost/postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# mattermost postgres worker
apiVersion: v1
kind: Pod
metadata:
name: mattermost-database
labels:
app: mattermost
role: mattermost-database
spec:
containers:
- name: mattermost-postgres
image: postgres:latest
ports:
- containerPort: 5432
95 changes: 95 additions & 0 deletions mattermost/worker-config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"ServiceSettings": {
"ListenAddress": ":80",
"MaximumLoginAttempts": 10,
"SegmentDeveloperKey": "",
"GoogleDeveloperKey": "",
"EnableOAuthServiceProvider": false,
"EnableIncomingWebhooks": false,
"EnableOutgoingWebhooks": false,
"EnablePostUsernameOverride": false,
"EnablePostIconOverride": false,
"EnableTesting": false,
"EnableSecurityFixAlert": true
},
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 50,
"EnableTeamCreation": true,
"EnableUserCreation": true,
"RestrictCreationToDomains": "",
"RestrictTeamNames": true,
"EnableTeamListing": false
},
"SqlSettings": {
"DriverName": "postgres",
"DataSource": "postgres://postgres:mattermost@postgres:5432/postgres?sslmode=disable",
"DataSourceReplicas": ["postgres://postgres:mattermost@postgres:5432/postgres?sslmode=disable"],
"MaxIdleConns": 10,
"MaxOpenConns": 10,
"Trace": false,
"AtRestEncryptKey": "7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QVg"
},
"LogSettings": {
"EnableConsole": false,
"ConsoleLevel": "INFO",
"EnableFile": true,
"FileLevel": "INFO",
"FileFormat": "",
"FileLocation": ""
},
"FileSettings": {
"DriverName": "local",
"Directory": "/var/mattermost/data/",
"EnablePublicLink": true,
"PublicLinkSalt": "A705AklYF8MFDOfcwh3I488G8vtLlVip",
"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": ""
}
}
15 changes: 15 additions & 0 deletions mattermost/worker-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# service for web worker
apiVersion: v1
kind: Service
metadata:
name: mattermost
labels:
app: mattermost
role: mattermost-worker
spec:
type: NodePort
ports:
- port: 80
name: http
selector:
role: mattermost-worker
32 changes: 32 additions & 0 deletions mattermost/worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: mattermost
role: mattermost-worker
name: mattermost-worker
namespace: default
spec:
replicas: 1
selector:
matchLabels:
role: mattermost-worker
template:
metadata:
labels:
app: mattermost
role: mattermost-worker
spec:
containers:
- image: localhost:5000/mattermost-worker:2.1.0
name: mattermost-worker
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- name: config-volume
mountPath: /var/mattermost/config
volumes:
- name: config-volume
configMap:
name: mattermost-v1
18 changes: 18 additions & 0 deletions mattermost/worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
# See License.txt for license information.
FROM ubuntu:14.04

# Copy over files
ADD https://releases.mattermost.com/2.1.0/mattermost-team-2.1.0-linux-amd64.tar.gz /
RUN cd /var && tar -zxvf /mattermost-team-2.1.0-linux-amd64.tar.gz && rm /mattermost-team-2.1.0-linux-amd64.tar.gz

ADD docker-entry.sh /var/mattermost/bin/docker-entry.sh
RUN chmod +x /var/mattermost/bin/docker-entry.sh

# Create default storage directory
RUN mkdir /var/mattermost/data

ENTRYPOINT ["/var/mattermost/bin/docker-entry.sh"]

# Expose port 80
EXPOSE 80
4 changes: 4 additions & 0 deletions mattermost/worker/docker-entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cd /var/mattermost/bin
./platform -config=/var/mattermost/config/config.json
30 changes: 30 additions & 0 deletions my-nginx-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: my-nginx
name: my-nginx
namespace: default
spec:
replicas: 2
selector:
matchLabels:
run: my-nginx
template:
metadata:
labels:
run: my-nginx
spec:
containers:
- image: nginx:1.11.5
name: my-nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- name: config-volume
mountPath: /etc/nginx/conf.d
volumes:
- name: config-volume
configMap:
name: my-nginx-v1
23 changes: 23 additions & 0 deletions my-nginx-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: my-nginx
name: my-nginx
namespace: default
spec:
replicas: 2
selector:
matchLabels:
run: my-nginx
template:
metadata:
labels:
run: my-nginx
spec:
containers:
- image: nginx:1.11.5
name: my-nginx
ports:
- containerPort: 80
protocol: TCP
23 changes: 23 additions & 0 deletions my-nginx-typo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: my-nginx
name: my-nginx
namespace: default
spec:
replicas: 2
selector:
matchLabels:
run: my-nginx
template:
metadata:
labels:
run: my-nginx
spec:
containers:
- image: nginx:1.91
name: my-nginx
ports:
- containerPort: 80
protocol: TCP

0 comments on commit 3154ce0

Please sign in to comment.