mirror of https://github.com/mindoc-org/mindoc.git
commit
01084c7b0b
|
@ -19,6 +19,7 @@ FROM alpine:latest
|
|||
LABEL maintainer="ehlxr.me@gmail.com"
|
||||
WORKDIR /mindoc
|
||||
COPY --from=0 /go/src/github.com/lifei6671/mindoc .
|
||||
ENV ZONEINFO=/mindoc/lib/time/zoneinfo.zip
|
||||
RUN chmod +x start.sh
|
||||
|
||||
CMD ["./start.sh"]
|
|
@ -113,6 +113,7 @@ mail_expired=30
|
|||
在启动镜像时需要提供如下的环境变量:
|
||||
|
||||
```ini
|
||||
DB_ADAPTER 制定 DB
|
||||
MYSQL_PORT_3306_TCP_ADDR MySQL地址
|
||||
MYSQL_PORT_3306_TCP_PORT MySQL端口号
|
||||
MYSQL_INSTANCE_NAME MySQL数据库名称
|
||||
|
@ -124,7 +125,7 @@ HTTP_PORT 程序监听的端口号
|
|||
举个栗子
|
||||
|
||||
```bash
|
||||
docker run -p 8181:8181 -e MYSQL_PORT_3306_TCP_ADDR=127.0.0.1 -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc_db -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest
|
||||
docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP_ADDR=10.xxx.xxx.xxx -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest
|
||||
```
|
||||
### docker-compose 一键安装
|
||||
1. 生成配置文件
|
||||
|
|
Loading…
Reference in New Issue