From df8d877fd0489f29b97fdbb8117a8031bf42a7d8 Mon Sep 17 00:00:00 2001 From: mol Date: Fri, 8 Dec 2023 15:44:14 +0800 Subject: [PATCH] test --- .drone.yml | 2 +- Dockerfile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 009c191..cd6a8a7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -58,6 +58,6 @@ steps: - list=$(docker ps -a | grep theresa3rd-bot* | awk '{print $1}') - test "$list" = "" && echo "none theresa3rd-bot containers running" || docker stop $list && docker container rm $list # 过滤出dockerImages的id, 删除none镜像 - - docker run -d -p 8138:80 --name=theresa3rd-bot_${DRONE_BUILD_NUMBER} --restart=always -v /mnt/data/opt/Theresa3rd-Bot/appsettings.Production.json:/app/appsettings.Production.json -v /mnt/data/opt/Theresa3rd-Bot/botsettings.yml:/app/botsettings.yml -v /mnt/data/opt/Theresa3rd-Bot/Config:/app/Config -e DOTNET_RUNNING_IN_CONTAINER=true git.liliyamol.cn:8081/mol/theresa3rd-bot:latest + - docker run -d -p 8138:80 --name=theresa3rd-bot_${DRONE_BUILD_NUMBER} --restart=always -v /mnt/data/opt/Theresa3rd-Bot/appsettings.Production.json:/app/appsettings.Production.json -v /mnt/data/opt/Theresa3rd-Bot/botsettings.yml:/app/botsettings.yml -v /mnt/data/opt/Theresa3rd-Bot/Config:/app/Config git.liliyamol.cn:8081/mol/theresa3rd-bot:latest - docker rmi $(docker images | grep "none" | awk '{print $3}') - echo ==-----==部署成功==-----== diff --git a/Dockerfile b/Dockerfile index 619cde3..7ac6031 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,7 @@ COPY ./Theresa3rd-Bot /app RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' >/etc/timezone +ENV DOTNET_RUNNING_IN_CONTAINER true + CMD dotnet TheresaBot.MiraiHttpApi.dll --launch-profile Production --urls http://0.0.0.0:80