fix docker

Change-Id: I2524f5fe176881b21d8c989065c04b825618dbf3
diff --git a/Dockerfile b/Dockerfile
index 497f1e0..b4651a8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,9 @@
-# 使用官方OpenJDK基础镜像(推荐Alpine轻量版)
 FROM eclipse-temurin:17-jdk-alpine
 
-# 设置工作目录
 WORKDIR /app
 
-# 复制构建好的JAR文件到镜像中
 COPY target/G8Backend-0.0.1-SNAPSHOT.jar app.jar
 
-# 暴露Spring Boot默认端口(根据实际项目修改)
 EXPOSE 8080
 
-# 启动命令
 ENTRYPOINT ["java", "-jar", "app.jar"]
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 4fac612..5dd8f0d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,6 +1,16 @@
 version: '3.8'
 
 services:
+  backend:
+    build: .
+    container_name: springboot-app
+    ports:
+      - "8080:8080"
+    environment:
+      - SPRING_REDIS_HOST=redis
+    depends_on:
+      - redis
+
   redis:
     image: "redis:alpine"
     container_name: "redis-server"
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 19ff0b5..9c851a3 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -7,7 +7,8 @@
 
 mybatis-plus.mapper-locations=classpath*:/mapper/**/*.xml
 
-spring.data.redis.host = 127.0.0.1
+#spring.data.redis.host = 127.0.0.1
+spring.data.redis.host = redis
 spring.data.redis.port = 6379
 
 spring.mail.host=smtp.qq.com