本次docker compsoe 方式部署的可道云使用三个服务
话不多说先上docker-compose.yml,着急的直接docker compose up -d运行
version: '3.5'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- "/root/kedaocloud/db:/var/lib/mysql"
environment:
- "TZ=Asia/Shanghai"
- "MYSQL_ROOT_PASSWORD=fk123456"
- "MYSQL_DATABASE=kodbox"
- "MYSQL_USER=admin"
- "MYSQL_PASSWORD=fk123456"
restart: always
app:
image: kodcloud/kodbox
ports:
- "8668:80"
links:
- db
- redis
volumes:
- "/root/kedaocloud/site:/var/www/html"
- "/mnt/user:/data"#你的本地目录映射给kodbox
restart: always
redis:
image: redis:alpine
environment:
- "TZ=Asia/Shanghai"
restart: always