2023-05-29 16:10:41 +08:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
mysql:
|
|
|
|
image: mysql:8
|
|
|
|
container_name: 'mysql'
|
|
|
|
hostname: 'mysql'
|
|
|
|
ports:
|
|
|
|
- "3306:3306"
|
|
|
|
volumes:
|
|
|
|
- mysql_data:/var/lib/mysql
|
|
|
|
environment:
|
2023-06-30 03:57:10 +08:00
|
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-mysql3306}
|
2023-05-29 16:10:41 +08:00
|
|
|
- MYSQL_USER=user
|
2023-06-30 03:57:10 +08:00
|
|
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-mysql3306}
|
2023-05-29 16:10:41 +08:00
|
|
|
restart: always
|
2023-12-06 01:42:24 +08:00
|
|
|
networks:
|
|
|
|
mysql_network:
|
2023-05-29 16:10:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mysql_data:
|
2023-12-06 01:42:24 +08:00
|
|
|
driver: local
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
mysql_network:
|
|
|
|
driver: bridge
|