diff --git a/blog-admin/Dockerfile b/blog-admin/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c23d30ba8b8742400a92a3daf15b2f15668b834c --- /dev/null +++ b/blog-admin/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:8 +COPY target/blog-admin-2.2.2.jar /usr/local/blog-admin-2.2.2.jar +RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone +CMD ["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-jar","/usr/local/blog-admin-2.2.2.jar"] \ No newline at end of file diff --git a/blog-core/src/main/resources/config/application-center-dev.yml b/blog-core/src/main/resources/config/application-center-dev.yml index d21702be4adadbc6a5dbef908aa994fe0942c1dc..3bca24697b017549f4acd960c99797e4b5a6aed9 100644 --- a/blog-core/src/main/resources/config/application-center-dev.yml +++ b/blog-core/src/main/resources/config/application-center-dev.yml @@ -7,18 +7,18 @@ spring: connection-init-sqls: set names utf8mb4 driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource - url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://192.168.169.130:3306/dblog?useUnicode=true&characterEncoding=utf-8 username: root - password: root + password: a.1.b2.c.3 ####### Redis Config ####### redis: database: 5 # Redis服务器地址 - host: 127.0.0.1 + host: 192.168.169.130 # Redis服务器连接端口 port: 6379 # Redis服务器连接密码(默认为空) - password: qwe!@#123 +# password: qwe!@#123 ####### redis缓存服务配置 ####### session: diff --git a/blog-web/Dockerfile b/blog-web/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c095ffda3ec363c4cd85f7c69fb519ea4a23c774 --- /dev/null +++ b/blog-web/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:8 +COPY target/blog-web-2.2.2.jar /usr/local/blog-web-2.2.2.jar +RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone +CMD ["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-jar","/usr/local/blog-web-2.2.2.jar"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000000000000000000000000000000000..933792e368c6cec0dd829a021668258092c3cbd9 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,13 @@ +version: "3" +services: + log-admin: + network_mode: host + build: + context: ./blog-admin + dockerfile: Dockerfile + + log-web: + network_mode: host + build: + context: ./blog-web + dockerfile: Dockerfile \ No newline at end of file