This commit is contained in:
2026-04-03 16:49:23 +10:00
parent f9fc9931f1
commit 051524961d

View File

@@ -10,15 +10,36 @@ steps:
- pip install pytest pytest-asyncio - pip install pytest pytest-asyncio
- pytest tests/ -v || true - pytest tests/ -v || true
- name: deploy - name: build-image
image: docker:cli image: plugins/docker
environment: settings:
DOCKER_HOST: tcp://127.0.0.1:2375 repo: gptchat
commands: tags:
- docker build -t gptchat:latest . - latest
- docker stop gptchat || true - ${DRONE_COMMIT_SHA:0:8}
- docker rm gptchat || true dockerfile: Dockerfile
- docker run -d --name gptchat -p 8484:8484 -v /opt/gptchat/data:/app/data --restart unless-stopped gptchat:latest context: .
when:
branch:
- main
event:
- push
- name: deploy
image: appleboy/drone-ssh
settings:
host: gitea.allowlgroup.ru
username:
from_secret: ssh_username
key:
from_secret: ssh_private_key
port: 22
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