Some useful
make
commands:
- make run will run the server, symlink your mattermost-webapp folder and start a watcher for the web app
- make stop stops the server and the web app watcher
- make run-server will run only the server and not the client
- make debug-server will run the server in the delve debugger
- make stop-server stops only the server
- make clean-docker stops and removes your Docker images and is a good way to wipe your database
- make clean cleans your local environment of temporary files
- make nuke wipes your local environment back to a completely fresh start
- make package creates packages for distributing your builds and puts them in the ~/go/src/github.com/mattermost/mattermost-server/dist directory. First you will need to run make build and make build-client.
- make megacheck runs the tool megacheck against the code base to find potential issues in the code. Please note the results are guidelines, and not mandatory in all cases. If in doubt, ask in the Developers community channel.
鉴权以及集成
建立用户:
go run main.go user create --email yang.yang@chinashuguo.com --username yang.yang --password 123456
数据库的配置信息:
数据的用户名密码等信息是在mattermost-server 目录下的Makefile 里面配置的,默认使用docker 里面的数据库
@if [ $(shell docker ps -a --no-trunc --quiet --filter name=^/mattermost-mysql$$ | wc -l) -eq 0 ]; then \
echo starting mattermost-mysql; \
docker run --name mattermost-mysql -p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=mostest \
-e MYSQL_USER=mmuser \
-e MYSQL_PASSWORD=mostest \
-e MYSQL_DATABASE=mattermost_test \
-d mysql:5.7 > /dev/null; \
elif [ $(shell docker ps --no-trunc --quiet --filter name=^/mattermost-mysql$$ | wc -l) -eq 0 ]; then \
echo restarting mattermost-mysql; \
docker start mattermost-mysql > /dev/null; \
fi