test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2023-12-08 15:00:28 +08:00
parent ccaf443009
commit 673512368d
2 changed files with 1 additions and 4 deletions

View File

@ -58,6 +58,6 @@ steps:
- list=$(docker ps -a | grep theresa3rd-bot* | awk '{print $1}') - 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 - test "$list" = "" && echo "none theresa3rd-bot containers running" || docker stop $list && docker container rm $list
# 过滤出dockerImages的id, 删除none镜像 # 过滤出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 -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 -e DOTNET_RUNNING_IN_CONTAINER=true git.liliyamol.cn:8081/mol/theresa3rd-bot:latest
- docker rmi $(docker images | grep "none" | awk '{print $3}') - docker rmi $(docker images | grep "none" | awk '{print $3}')
- echo ==-----==部署成功==-----== - echo ==-----==部署成功==-----==

View File

@ -1,12 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet FROM mcr.microsoft.com/dotnet/aspnet
EXPOSE 80 EXPOSE 80
# VOLUME [ "/app/appsettings.Production.json", "/app/botsettings.yml" ]
WORKDIR /app WORKDIR /app
COPY ./Theresa3rd-Bot /app COPY ./Theresa3rd-Bot /app
RUN ls RUN ls
# RUN dotnet TheresaBot.MiraiHttpApi.dll --launch-profile Production --urls http://0.0.0.0:80
CMD dotnet TheresaBot.MiraiHttpApi.dll --launch-profile Production --urls http://0.0.0.0:80 CMD dotnet TheresaBot.MiraiHttpApi.dll --launch-profile Production --urls http://0.0.0.0:80