准备docker-compose文件 {#%E5%87%86%E5%A4%87docker-compose%E6%96%87%E4%BB%B6}
*
01
*
02
*
03
*
04
*
05
*
06
*
07
*
08
*
09
*
10
*
11
*
12
*
13
*
14
*
15
*
16
*
17
*
18
*
19
*
20
*
21
*
22
*
23
*
24
*
25
*
26
*
27
*
28
*
29
*
30
*
31
*
32
*
33
*
34
version: '3'
services:
lskypro:
image: halcyonazure/lsky-pro-docker:latest
restart: unless-stopped
hostname: lskypro
container_name: lskypro
volumes:
- ./lsky-data:/var/www/html/
ports:
- "9080:80"
networks:
- lsky-net
mysql-lsky:
image: mysql:5.7.22
restart: unless-stopped
# 主机名,可作为"数据库连接地址"
hostname: mysql-lsky
container_name: mysql-lsky
# 修改认证方式
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf:/etc/mysql
- ./mysql/log:/var/log/mysql
environment:
MYSQL_ROOT_PASSWORD: lskY12.3 # 数据库root用户密码,自行修改
MYSQL_DATABASE: lsky-data
networks:
- lsky-net
networks:
lsky-net: {}
</code>
</pre>
这里将9080端口映射到了容器的80端口。
手动准备目录
```text
├── lsky-data
├── mysql
│ ├── conf
│ ├── data
│ ├── log
└── docker-compose.yml
</code>
</pre>
运行 {#%E8%BF%90%E8%A1%8C}
------------------------
项目根目录下执行
` docker-compose up -d `
成功运行后使用浏览器进入lskypro的web: http://ip:9080
图床便捷工具 {#%E5%9B%BE%E5%BA%8A%E4%BE%BF%E6%8D%B7%E5%B7%A5%E5%85%B7}
----------------------------------------------------------------
* https://www.u.tools/ 的图床插件
* https://github.com/Molunerfinn/PicGo
```