This commit is contained in:
Chinky 2023-12-04 22:48:23 +08:00
commit c24c899ef5
1 changed files with 55 additions and 0 deletions

55
docker-compose.yml Normal file
View File

@ -0,0 +1,55 @@
version: '3'
services:
db:
image: mysql:latest
container_name: MySQL
restart: always
environment:
# MYSQL_DATABASE: "service_manage"
MYSQL_USER: "tongji"
MYSQL_PASSWORD: "lldlcj123"
MYSQL_ROOT_PASSWORD: "lldlcj123"
TZ: "UTC"
# 容器日志大小配置
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
logging:
driver: 'json-file'
options:
max-size: '5g'
ports:
- 6306:3306
volumes:
- db:/var/lib/mysql
network_mode: "bridge"
phpmyadmin:
image: phpmyadmin:latest
container_name: phpmyadmin_1
network_mode: "bridge"
environment:
# - PMA_USER=root
# - PMA_PASSWORD=lldlcj123
# - MYSQL_ROOT_PASSWORD=lldlcj123
- PMA_HOST=192.168.222.5
# - PMA_PORT=3306
# 任意服务器一起使用
# - PMA_ARBITRARY=1
- TZ="UTC"
restart: always
ports:
- 8091:80
volumes:
- sessions:/sessions
# depends_on:
# links:
# - db
volumes:
- db
- cfg
- sessions