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