diff --git a/docker-compose/mysql/mysql.yaml b/docker-compose/mysql/mysql.yaml new file mode 100644 index 0000000..c958a0e --- /dev/null +++ b/docker-compose/mysql/mysql.yaml @@ -0,0 +1,29 @@ +version: "3.8" +services: + mysql: + container_name: mysql + network_mode: "host" + image: mysql:8.0.45 + ports: + - "3306:3306" + environment: + - TZ=Asia/Shanghai + - LANG=en_US.UTF-8 + - MYSQL_ROOT_PASSWORD=123456 + - LANG=C.UTF-8 + volumes: + - /storage/data/mysql/data:/var/lib/mysql + - /storage/data/mysql/logs:/var/log/mysql + - /storage/data/mysql/conf/mysql.cnf:/etc/my.cnf + ulimits: + nproc: 65535 + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + logging: + driver: json-file + options: + max-size: 500m + restart: always \ No newline at end of file