Create docker-compose.yml

This commit is contained in:
jonny 2022-05-22 17:19:53 +08:00 committed by GitHub
parent 45a6424ccc
commit 8262f83210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 43 additions and 0 deletions

43
docker/docker-compose.yml Normal file
View File

@ -0,0 +1,43 @@
version: "3"
services:
mrdoc:
build:
context: think
args:
EIP: x.x.x.x # api接口IP,必须设置,可以是 IP 或者域名.
image: think
container_name: thinkdoc
#restart: always
volumes:
- /path/to/you/dir/config:/app/config # 请注意修改 /path/to/you/dir 为云策文档配置文件目录.
environment:
- TZ=Asia/Shanghai
ports:
- "5001-5003:5001-5003"
depends_on:
- mysql
mysql:
image: mysql:5.7
container_name: mysql-with-think
#restart: always
volumes:
- /path/to/you/dir:/var/lib/mysql # 请注意修改 /path/to/you/dir 为您要存储mysql数据的目录绝对路径.
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=Jonnyan404!
- MYSQL_DATABASE=think
- MYSQL_USER=jonnyan404
- MYSQL_PASSWORD=www.mrdoc.fun
expose:
- "3306"
ports:
- "63306:3306" # 如果不需要外部连接mysql,可注释此行+上一行.
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
# Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/
#volumes:
# thinkdoc-data:
# driver: local
# mysql-data:
# driver: local