mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-04-05 20:17:53 +08:00
commit
78ca07b14c
@ -88,7 +88,7 @@ mail_expired=30
|
||||
在启动镜像时需要提供如下的环境变量:
|
||||
|
||||
```ini
|
||||
DB_ADAPTER 制定 DB
|
||||
DB_ADAPTER 指定 DB
|
||||
MYSQL_PORT_3306_TCP_ADDR MySQL地址
|
||||
MYSQL_PORT_3306_TCP_PORT MySQL端口号
|
||||
MYSQL_INSTANCE_NAME MySQL数据库名称
|
||||
@ -109,6 +109,7 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
|
||||
`environment`节点,配置自己的环境变量。
|
||||
|
||||
2. 一键完成所有环境搭建
|
||||
|
||||
> docker-compose up -d
|
||||
3. 浏览器访问
|
||||
> http://localhost:8181/
|
||||
@ -116,12 +117,16 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
|
||||
整个部署完成了
|
||||
4. 常用命令参考
|
||||
- 启动
|
||||
|
||||
> docker-compose up -d
|
||||
- 停止
|
||||
|
||||
> docker-compose stop
|
||||
- 重启
|
||||
|
||||
> docker-compose restart
|
||||
- 停止删除容器,释放所有资源
|
||||
|
||||
> docker-compose down
|
||||
- 删除并重新创建
|
||||
> docker-compose -f docker-compose.yml down && docker-compose up -d
|
||||
|
@ -39,6 +39,7 @@ build_script:
|
||||
- set CGO_ENABLED=1
|
||||
- for /f "delims=" %%i in ('go version') do (set GO_VERSION=%%i)
|
||||
- cd c:\gopath\src\github.com\lifei6671\mindoc
|
||||
- go mod tidy
|
||||
- go build -v -o "mindoc_windows_%GOARCH%.exe" -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=%date% %time%' -X 'conf.GO_VERSION=%GO_VERSION%'"
|
||||
- 7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* static/* mindoc_windows_%GOARCH%.exe views/* uploads/*
|
||||
test_script:
|
||||
|
@ -1,11 +1,12 @@
|
||||
package mail
|
||||
|
||||
import (
|
||||
"os"
|
||||
// "os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSend(t *testing.T) {
|
||||
/*
|
||||
conf := &SMTPConfig{
|
||||
Username: "swh@adm***.com",
|
||||
Password: "",
|
||||
@ -26,4 +27,5 @@ func TestSend(t *testing.T) {
|
||||
} else {
|
||||
t.Log("发送成功")
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user