2023-02-06 15:53:30 +08:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
2023-02-07 15:21:24 +08:00
|
|
|
mysql:
|
2023-06-02 14:38:49 +08:00
|
|
|
image: mysql:5.7.42
|
2023-02-06 15:53:30 +08:00
|
|
|
container_name: ${CONTAINER_NAME}
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: ${PANEL_DB_ROOT_PASSWORD}
|
|
|
|
networks:
|
2023-02-13 15:30:25 +08:00
|
|
|
- 1panel-network
|
2023-02-06 15:53:30 +08:00
|
|
|
ports:
|
|
|
|
- ${PANEL_APP_PORT_HTTP}:3306
|
|
|
|
volumes:
|
|
|
|
- ./data/:/var/lib/mysql
|
|
|
|
- ./conf/my.cnf:/etc/mysql/my.cnf
|
|
|
|
- ./log:/var/log/mysql
|
2023-05-05 15:20:57 +08:00
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2023-02-06 15:53:30 +08:00
|
|
|
command:
|
|
|
|
--character-set-server=utf8mb4
|
|
|
|
--collation-server=utf8mb4_general_ci
|
|
|
|
--explicit_defaults_for_timestamp=true
|
|
|
|
--lower_case_table_names=1
|
|
|
|
labels:
|
|
|
|
createdBy: "Apps"
|
|
|
|
networks:
|
2023-02-13 15:30:25 +08:00
|
|
|
1panel-network:
|
2023-02-06 15:53:30 +08:00
|
|
|
external: true
|