diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d34c637 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,36 @@ +version: '3.9' + +services: + mysql: + image: mysql:8.0 + container_name: mysql + restart: always + environment: + + ports: + - "3306:3306" + volumes: + - ./mysql_data:/var/lib/mysql + command: [ + "--character-set-server=utf8mb4", + "--collation-server=utf8mb4_unicode_ci" + ] + deploy: + resources: + limits: + cpus: '2.0' + memory: 1G + + redis: + image: redis:7.2 + container_name: redis + restart: always + ports: + - "6379:6379" + volumes: + - ./redis_data:/data + command: ["redis-server", "--appendonly", "yes"] + +volumes: + mysql_data: + redis_data: \ No newline at end of file