diff --git a/Dockerfile b/Dockerfile
index 7c8389f..fec7ac8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,12 @@
-FROM openjdk:17
-MAINTAINER 杭州白书科技有限公司 "tengyongzhi@meedu.vip"
+FROM openjdk:17-slim
+
+WORKDIR /app
# 使用东八区时间环境
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 将指定目录下的jar包复制到docker容器的/目录下
-COPY /target/*.jar /app.jar
+COPY /target/playedu-api-*.jar /app/app.jar
# 声明服务运行在8080端口
EXPOSE 9898
diff --git a/docker-build.sh b/docker-build.sh
new file mode 100755
index 0000000..28e8868
--- /dev/null
+++ b/docker-build.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+echo '设置M2_HOME...'
+
+cp -r docker/.m2 /root
+
+ls /root/.m2
+
+echo '开始打包...'
+
+export MAVEN_OPTS=-Dmaven.test.skip=true
+
+/app/mvnw clean package
\ No newline at end of file
diff --git a/docker/.m2/settings.xml b/docker/.m2/settings.xml
new file mode 100755
index 0000000..4ae00f9
--- /dev/null
+++ b/docker/.m2/settings.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ ali
+ ali Maven
+ *
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+
+
diff --git a/pom.xml b/pom.xml
index 32f5718..12e5f63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,6 +16,7 @@
17
+
org.springframework.boot
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 96ecb99..bb27a03 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -8,7 +8,7 @@ spring:
proxy-target-class: true
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
- url: "jdbc:mysql://127.0.0.1:33060/java-meedu?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false"
+ url: "jdbc:mysql://192.168.3.9:33060/java-meedu?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false"
username: "root"
password: "root"
type: com.zaxxer.hikari.HikariDataSource
@@ -19,7 +19,7 @@ spring:
# Redis配置
data:
redis:
- host: "127.0.0.1"
+ host: "192.168.3.9"
port: 6379
password:
database: 0
@@ -46,7 +46,7 @@ spring:
minio:
access-key: "username"
secret-key: "password"
- end-point: "http://127.0.0.1:9000"
+ end-point: "http://192.168.3.9:9000"
bucket: "playedu"
domain: "https://dev-local3.meedu.vip/"
diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml
index 53457f6..d20206b 100644
--- a/src/main/resources/logback-spring.xml
+++ b/src/main/resources/logback-spring.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/src/test/java/xyz/playedu/api/PlayeduApiApplicationTests.java b/src/test/java/xyz/playedu/api/PlayeduApiApplicationTests.java
deleted file mode 100644
index 7652320..0000000
--- a/src/test/java/xyz/playedu/api/PlayeduApiApplicationTests.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package xyz.playedu.api;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class PlayeduApiApplicationTests {
-
- @Test
- void contextLoads() {
- }
-
-}