rxr_docker_compose/rxr_kodbox/docker-compose.yml

33 lines
803 B
YAML
Raw Normal View History

2024-11-10 10:28:26 +00:00
version: "3.5"
services:
db:
2024-11-22 00:33:25 +00:00
restart: always
2024-11-10 10:28:26 +00:00
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- ${KOD_PATH}/db:/var/lib/mysql #左边 ./db 代表数据库持久化目录位置
environment:
- "TZ=Asia/Shanghai"
- "MYSQL_ROOT_PASSWORD"
- "MYSQL_DATABASE"
- "MYSQL_USER"
- "MYSQL_PASSWORD"
app:
image: kodcloud/kodbox
ports:
- 8080:80 #左边 80 是主机访问端口,可按需修改
links:
- db
- redis
volumes:
- ${KOD_PATH}/site:/var/www/html #左边 ./site 代表kodbox持久化目录位置
- ${DATA_PATH}:/data
restart: always
redis:
image: redis:alpine
environment:
- "TZ=Asia/Shanghai"
restart: always