From 3e0220c593e194cfbddfde48b06c4243950bd8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=A8=E5=93=80?= <2076029107@qq.com> Date: Wed, 31 Jul 2024 19:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- Dockerfile | 19 +++++++++++++++++++ src/main/resources/bootstrap.yml | 8 ++++---- 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index 09bdfea..8a1c2a8 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,4 @@ nbdist/ !*/build/*.java !*/build/*.html -!*/build/*.xml \ No newline at end of file +!*/build/*.xml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a4e3ddd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +#指定镜像的起始镜像 +FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/dragonwell:17.0.4.0.4.8-standard-ga-8.6 + +#执行一些必备的条件 + +#定义时区参数 +ENV TZ=Asia/Shanghai + +RUN ln -snf /usr/share/zoneinfo/$Tz /etc/localtime && echo '$TZ' > /etc/timezone + +#挂载工作目录 +VOLUME ["/home/logs/cloud-gateway"] + +#拷贝执行jar包 +COPY ./target/cloud-gateway.jar /home/app.jar + +#构建启动命令 +ENTRYPOINT ["java","-Dfile.encoding=utf-8","-jar"] +CMD ["/home/app.jar"] diff --git a/src/main/resources/bootstrap.yml b/src/main/resources/bootstrap.yml index fc20398..ba6c43a 100644 --- a/src/main/resources/bootstrap.yml +++ b/src/main/resources/bootstrap.yml @@ -4,10 +4,10 @@ server: # nacos线上地址 nacos: - addr: 111.231.50.146 - user-name: root - password: ldj1209 - namespace: sy-cloud + addr: 123.249.110.115:8848 + user-name: nacos + password: nacos + namespace: cloud-yp # Spring spring: