From 4509ebea60143241a47c0478d00748c8b4e46c82 Mon Sep 17 00:00:00 2001 From: hello-dd-code Date: Sat, 28 Feb 2026 16:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=B3=E5=85=A5docker-compose=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=B9=B6=E5=BF=BD=E7=95=A5=E6=9C=AC=E5=9C=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E4=BA=A7=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ docker-compose.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index 98fe13f..3ee7d37 100755 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ go.work # Logs *.log .cache/* + +# Local build binary +wx_service diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c916c6f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +services: + mysql: + image: mysql:8.0 + container_name: wx_service_mysql + restart: always + environment: + MYSQL_ROOT_PASSWORD: root_password + MYSQL_DATABASE: wx_service + ports: + - "3306:3306" + volumes: + - mysql_data:/var/lib/mysql + command: --default-authentication-plugin=mysql_native_password --innodb-buffer-pool-size=64M + + redis: + image: redis:7-alpine + container_name: wx_service_redis + restart: always + ports: + - "6379:6379" + volumes: + - redis_data:/data + command: redis-server --appendonly yes --maxmemory 64mb --maxmemory-policy allkeys-lru + +volumes: + mysql_data: + redis_data: