version: '3'
services:
lsky-pro:
container_name: lsky-pro
image: dko0/lsky-pro
restart: always
volumes:
- /root/docker/lsky/lsky-pro-data:/var/www/html #映射到本地
ports:
- 57791:80
environment:
- MYSQL_HOST=mysql
- MYSQL_DATABASE=lsky-pro
- MYSQL_USER=admin
- MYSQL_PASSWORD=980501Mzh
mysql:
image: mysql:8.0
container_name: lsky-pro-db
restart: always
environment:
- MYSQL_DATABASE=lsky-pro
- MYSQL_USER=admin
- MYSQL_PASSWORD=980501Mzh
- MYSQL_ROOT_PASSWORD=980501Mzh
volumes:
- /root/docker/lsky/db:/var/lib/mysql