litemall/docker/docker-compose.yml

35 lines
853 B
YAML
Raw Permalink Normal View History

2025-04-14 14:25:41 +08:00
version: '3'
services:
mysql57:
image: mysql:5.7
container_name: mysql
ports:
- "3306:3306"
command:
--character-set-server=utf8
--collation-server=utf8_general_ci
--default-authentication-plugin=mysql_native_password
volumes:
- ./db/conf.d:/etc/mysql/conf.d
- ./db/data:/var/lib/mysql
- ./db/init-sql:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: litemall123456
restart: always
litemall:
build:
context: litemall
dockerfile: Dockerfile
container_name: litemall
ports:
- "8080:8080"
volumes:
- ./litemall/storage:/storage
- ./litemall/logs:/logs
- ./litemall/backup:/backup
- /etc/localtime:/etc/localtime
environment:
- TZ=Asia/Shanghai
depends_on:
- mysql57
restart: always