)
This commit is contained in:
37
.drone.yml
37
.drone.yml
@@ -10,36 +10,15 @@ steps:
|
|||||||
- pip install pytest pytest-asyncio
|
- pip install pytest pytest-asyncio
|
||||||
- pytest tests/ -v || true
|
- pytest tests/ -v || true
|
||||||
|
|
||||||
- name: build-image
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: gptchat
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- ${DRONE_COMMIT_SHA:0:8}
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
context: .
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: appleboy/drone-ssh
|
image: docker:cli
|
||||||
settings:
|
environment:
|
||||||
host: gitea.allowlgroup.ru
|
DOCKER_HOST: unix:///var/run/docker.sock
|
||||||
username:
|
commands:
|
||||||
from_secret: ssh_username
|
- docker build -t gptchat:latest .
|
||||||
key:
|
- docker stop gptchat || true
|
||||||
from_secret: ssh_private_key
|
- docker rm gptchat || true
|
||||||
port: 22
|
- docker run -d --name gptchat -p 8484:8484 --restart unless-stopped gptchat:latest
|
||||||
script:
|
|
||||||
- cd /opt/gptchat || mkdir -p /opt/gptchat
|
|
||||||
- cd /opt/gptchat && docker build -t gptchat:latest .
|
|
||||||
- docker stop gptchat || true
|
|
||||||
- docker rm gptchat || true
|
|
||||||
- docker run -d --name gptchat -p 8484:8484 -v /opt/gptchat/data:/app/data --restart unless-stopped gptchat:latest
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
|||||||
Reference in New Issue
Block a user