diff options
-rw-r--r-- | README.md | 58 | ||||
-rw-r--r-- | api/post.go | 2 | ||||
-rwxr-xr-x | docker/Dockerrun.aws.json | 13 | ||||
-rw-r--r-- | model/utils.go | 2 | ||||
-rw-r--r-- | utils/config.go | 4 |
5 files changed, 69 insertions, 10 deletions
@@ -2,14 +2,14 @@ **Team Communication Service** **Version 0.40** -What matters most to your team? -=============================== -Words have power. -Mattermost serves teams who use words to shape the future. -The words you choose are up to you. +About Mattermost +================ + +Mattermost is a team communication service. It brings team messaging and file sharing into one place, accessible across PCs and phones, with archiving and search. + +We built Mattermost to help teams focus on what matters most to them. It works for us, we hope it works for you too. -*- SpinPunch* Installing the Mattermost Preview ================================= @@ -18,18 +18,57 @@ You're installing "Mattermost Preview", a pre-released 0.40 version intended for That said, any issues at all, please let us know on the Mattermost forum at: http://bit.ly/1MY1kul -Developer Machine Setup (Docker/Mac) ------------------------------------- +Local Machine Setup (Docker) +----------------------------- + +### Mac OSX ### 1. Follow the instructions at http://docs.docker.com/installation/mac/ 1. Use the Boot2Docker command-line utility 2. If you do command-line setup use: `boot2docker init eval “$(boot2docker shellinit)”` 2. Get your Docker IP address with `boot2docker ip` 3. Add a line to your /etc/hosts that goes `<Docker IP> dockerhost` -4. Run `boot2docker shellinit` and copy the export statements to your ~/.bash_profile +4. Run `boot2docker shellinit` and copy the export statements to your ~/.bash\_profile 5. Run `docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform:helium` 6. When docker is done fetching the image, open http://dockerhost:8065/ in your browser +### Ubuntu ### +1. Follow the instructions at https://docs.docker.com/installation/ubuntulinux/ or use the summery below. + +`sudo apt-get update` + +`sudo apt-get install wget` + +`wget -qO- https://get.docker.com/ | sh` + +`sudo usermod -aG docker <username>` + +`sudo service docker start` + +`newgrp docker` + +2. Run `docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform:helium +3. When docker is done fetching the image, open http://localhost:8065/ in your browser + +### Arch ### +1. Install docker using the following commands + +`pacman -S docker` + +`systemctl enable docker.service` + +`systemctl start docker.service` + +`gpasswd -a <username> docker` + +`newgrp docker` + +2. docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform:helium +3. When docker is done fetching the image, open http://localhost:8065/ in your browser + +### Notes ### +If your ISP blocks port 25 then you may install locally but email will not be sent. + If you want to work with the latest bits in the repo you can run the cmd `docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform:latest` @@ -40,6 +79,7 @@ If you wish to remove mattermost-dev use the following commands 1. `docker stop mattermost-dev` 2. `docker rm -v mattermost-dev` + AWS Elastic Beanstalk Setup (Docker) ------------------------------------ diff --git a/api/post.go b/api/post.go index 36607c231..3acc95551 100644 --- a/api/post.go +++ b/api/post.go @@ -302,7 +302,7 @@ func fireAndForgetNotifications(post *model.Post, teamId, teamUrl string) { // Build a map as a list of unique user_ids that are mentioned in this post splitF := func(c rune) bool { - return c == ',' || c == ' ' || c == '.' || c == '!' || c == '?' || c == ':' || c == '<' || c == '>' + return model.SplitRunes[c] } splitMessage := strings.FieldsFunc(strings.Replace(post.Message, "<br>", " ", -1), splitF) for _, word := range splitMessage { diff --git a/docker/Dockerrun.aws.json b/docker/Dockerrun.aws.json new file mode 100755 index 000000000..52bbb2ae5 --- /dev/null +++ b/docker/Dockerrun.aws.json @@ -0,0 +1,13 @@ +{
+ "AWSEBDockerrunVersion": "1",
+ "Image": {
+ "Name": "mattermost/platform",
+ "Update": "true"
+ },
+ "Ports": [
+ {
+ "ContainerPort": "80"
+ }
+ ],
+ "Logging": "/var/log/"
+}
diff --git a/model/utils.go b/model/utils.go index 2541247de..262bda319 100644 --- a/model/utils.go +++ b/model/utils.go @@ -319,3 +319,5 @@ func ClearMentionTags(post string) string { var UrlRegex = regexp.MustCompile(`^((?:[a-z]+:\/\/)?(?:(?:[a-z0-9\-]+\.)+(?:[a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|local|internal))(:[0-9]{1,5})?(?:\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(?:\?[a-z0-9+_~\-\.%=&]*)?)?(?:#[a-zA-Z0-9!$&'()*+.=-_~:@/?]*)?)(?:\s+|$)$`) var PartialUrlRegex = regexp.MustCompile(`/api/v1/files/(get|get_image)/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/(([A-Za-z0-9]+/)?.+\.[A-Za-z0-9]{3,})`) + +var SplitRunes = map[rune]bool{',': true, ' ': true, '.': true, '!': true, '?': true, ':': true, ';': true, '\n': true, '<': true, '>': true, '(': true, ')': true, '{': true, '}': true, '[': true, ']': true, '+': true, '/': true, '\\': true} diff --git a/utils/config.go b/utils/config.go index 23bd3e85a..6a7e4589c 100644 --- a/utils/config.go +++ b/utils/config.go @@ -221,6 +221,10 @@ func LoadConfig(fileName string) { // Grabs the domain from enviroment variable if not in configuration if config.ServiceSettings.Domain == "" { config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN") + // If the enviroment variable is not set, use a default + if config.ServiceSettings.Domain == "" { + config.ServiceSettings.Domain = "localhost" + } } // Check for a valid email for feedback, if not then do feedback@domain |