This commit is contained in:
parent
fab5677b8f
commit
4ee2e545a9
31
.drone.yml
31
.drone.yml
@ -3,30 +3,6 @@ type: docker
|
|||||||
name: thief_music
|
name: thief_music
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 删除老版本
|
|
||||||
- name: deploy-clean
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
when:
|
|
||||||
branch: master
|
|
||||||
event: push
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: ssh_host
|
|
||||||
username:
|
|
||||||
from_secret: ssh_username
|
|
||||||
password:
|
|
||||||
from_secret: ssh_password
|
|
||||||
port: 2222
|
|
||||||
command_timeout: 2m
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if docker container ls -a -f name=thief_music | grep -q thief_music; then
|
|
||||||
docker stop thief_music
|
|
||||||
docker rm thief_music
|
|
||||||
else
|
|
||||||
echo "Container thief_music is not running, nothing to stop and remove."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 上传文件
|
# 上传文件
|
||||||
- name: upload-file
|
- name: upload-file
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
@ -64,4 +40,11 @@ steps:
|
|||||||
script:
|
script:
|
||||||
- cd /root/Projects/thief_music
|
- cd /root/Projects/thief_music
|
||||||
- docker build -t thief_music .
|
- docker build -t thief_music .
|
||||||
|
- |
|
||||||
|
if docker container ls -a -f name=thief_music | grep -q thief_music; then
|
||||||
|
docker stop thief_music
|
||||||
|
docker rm thief_music
|
||||||
|
else
|
||||||
|
echo "Container thief_music is not running, nothing to stop and remove."
|
||||||
|
fi
|
||||||
- docker run -d --name thief_music -p 7788:7788 thief_music
|
- docker run -d --name thief_music -p 7788:7788 thief_music
|
||||||
|
@ -32,3 +32,4 @@ uvicorn==0.20.0
|
|||||||
w3lib==2.1.1
|
w3lib==2.1.1
|
||||||
websockets==10.4
|
websockets==10.4
|
||||||
zipp==3.16.2
|
zipp==3.16.2
|
||||||
|
python-multipart==0.0.6
|
||||||
|
Loading…
Reference in New Issue
Block a user