|
@@ -0,0 +1,40 @@
|
|
|
+version : '3'
|
|
|
+services:
|
|
|
+ mysql:
|
|
|
+ platform: linux/x86_64
|
|
|
+ container_name: mysql
|
|
|
+ image: mysql:5.7
|
|
|
+ build:
|
|
|
+ context: .
|
|
|
+ dockerfile: mysql-dockerfile
|
|
|
+ ports:
|
|
|
+ - "3306:3306"
|
|
|
+ volumes:
|
|
|
+ - ./mysql/conf:/etc/mysql/conf.d
|
|
|
+ - ./mysql/logs:/logs
|
|
|
+ - ./mysql/data:/var/lib/mysql
|
|
|
+ command: [
|
|
|
+ 'mysqld',
|
|
|
+ '--innodb-buffer-pool-size=80M',
|
|
|
+ '--character-set-server=utf8mb4',
|
|
|
+ '--collation-server=utf8mb4_unicode_ci',
|
|
|
+ '--default-time-zone=+8:00',
|
|
|
+ '--lower-case-table-names=1'
|
|
|
+ ]
|
|
|
+ environment:
|
|
|
+ MYSQL_DATABASE: ${DB_NAME}
|
|
|
+ MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
|
|
+ networks:
|
|
|
+ - app-network
|
|
|
+
|
|
|
+ redis:
|
|
|
+ image: redis:5.0
|
|
|
+ ports:
|
|
|
+ - "6379:6379"
|
|
|
+ restart: always
|
|
|
+ networks:
|
|
|
+ - app-network
|
|
|
+
|
|
|
+networks:
|
|
|
+ app-network:
|
|
|
+ driver: bridge
|