This commit is contained in:
maqian 2021-10-13 16:41:09 +08:00
parent 275b94a417
commit 74c394c3bd
2 changed files with 4 additions and 38 deletions

BIN
docs/.DS_Store vendored

Binary file not shown.

View File

@ -20,63 +20,29 @@ docker-compose.yml同目录下会生成一个data文件夹用于存放当
下载:[docker_compose.yml](http://hfish.cn-bj.ufileos.com/docker-compose/2.6.2/docker-compose.yml)
复制:
```shell
version: "3.7"
services:
web:
image: threatbook/hfish-server:2.6.2
network_mode: "host"
container_name: hfish-server # 容器名
restart: always
volumes:
- "./logs:/opt/hfish/logs"
- "/root/.hfish:/root/.hfish"
depends_on:
- db
command: sh /wait.sh hfish root 1234567 3306 /opt/hfish/server
db:
image: threatbook/hfish-mysql:2.6.2
# build: ./mysql
restart: always
container_name: hfish-mysql-db # 容器名
environment:
- MYSQL_ROOT_PASSWORD=1234567
- TZ=Asia/Shanghai
ports:
- 3306:3306
volumes:
- ./data:/var/lib/mysql
command: --character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--default-time-zone=+08:00
```
> 步骤2:在dockercompose.yml中按需修改MySql的映射端口和密码
`注意,无论是修改端口还是密码,都需要将箭头所指的两个位置同步做修改`
![image-20211012222209522](http://img.threatbook.cn/hfish/image-20211012222209522.png)
<img src="http://img.threatbook.cn/hfish/image-20211012222209522.png" alt="image-20211012222209522" style="zoom:50%;" />
> 步骤3: 使用docker-compose up命令启动docker
```
docker-compose up
docker-compose up -d
```
> 注意:在docker启动后会有几分钟的mysql容器初始化请耐心等待
<img src="http://img.threatbook.cn/hfish/image-20211012222554572.png" alt="image-20211012222554572" style="zoom:50%;" />
<img src="http://img.threatbook.cn/hfish/image-20211012222554572.png" alt="image-20211012222554572" style="zoom: 25%;" />
<img src="http://img.threatbook.cn/hfish/image-20211012222730930.png" alt="image-20211012222730930" style="zoom:50%;" />
<img src="http://img.threatbook.cn/hfish/image-20211013163538978.png" alt="image-20211013163538978" style="zoom:25%;" />