From cecc439dc5c759b3ceef0a91c69841baadbdb9b5 Mon Sep 17 00:00:00 2001 From: wulin Date: Sat, 21 Oct 2023 20:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=8D=E5=90=8Cdocker?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/modules/websocket/dockerfile_test | 16 ++++++++++++++++ .../src/main/resources/bootstrap.yml | 2 -- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 docker/modules/websocket/dockerfile_test diff --git a/docker/modules/websocket/dockerfile_test b/docker/modules/websocket/dockerfile_test new file mode 100644 index 0000000..68a8ac7 --- /dev/null +++ b/docker/modules/websocket/dockerfile_test @@ -0,0 +1,16 @@ +# 基础镜像 +FROM openjdk:8-jre +# author +MAINTAINER qiuguo + +# 挂载目录 +VOLUME /home/qiuguo +# 创建目录 +RUN mkdir -p /home/qiuguo +# 指定路径 +WORKDIR /home/qiuguo +# 复制jar文件到路径 +COPY ./jar/iot-box-websocket-api.jar /home/qiuguo/iot-box-websocket-api.jar +# 启动网关服务 +#ENTRYPOINT ["java","-jar","iot-box-websocket-api.jar"] +CMD ["sh","-c", "java -jar iot-box-websocket-api.jar --spring.profiles.active=prod"] diff --git a/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml index aa084ee..db57474 100644 --- a/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml +++ b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml @@ -1,7 +1,5 @@ server: port: 8080 spring: - profiles: - active: test application: name: qiuguo-iot-box-websocket \ No newline at end of file