diff --git a/Dockerfile b/Dockerfile index db1ce88f..b41f8bcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:11-jre-slim WORKDIR /app -ADD iot-starter/target/iot-starter-0.4.5-SNAPSHOT.jar /app +ADD iot-starter/target/iot-starter-0.4.5-SNAPSHOT.jar /app/app.jar ADD data/init /app/data/init ADD data/components /app/data/components ADD data/converters /app/data/converters diff --git a/docker-compose/docker-compose-iita.yml b/docker-compose/docker-compose-iita.yml new file mode 100644 index 00000000..9e4dac0f --- /dev/null +++ b/docker-compose/docker-compose-iita.yml @@ -0,0 +1,25 @@ +version: "3" +services: + iita-app: + container_name: iita-app + # 改成你自己的镜像 + image: 75509151/iita-app:0.5.4 + # 构建镜像时使用 + build: + context: "" + dockerfile: Dockerfile + + restart: always + # 使用主机端口 + network_mode: "host" + volumes: +# - ./admin-service.jar:/admin-service.jar + - /app/data:/app/data/ + - /app/config:/app/config/ + - /app/log:/app/log/ + command: + - /bin/sh + - -c + - | + echo "Asia/Shanghai" > /etc/timezone + java -DdisabledEmbeddedRedis=true -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -server -Xmx512m -Xms512m -Xmn256m -Xss256k -Dlogging.path=/app/log/ -Dspring.config.location=/app/config/ -jar /app/app.jar