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: 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: docker:cli image: appleboy/drone-ssh
environment: settings:
DOCKER_HOST: tcp://127.0.0.1:2375 host: gitea.allowlgroup.ru
commands: username:
- docker build -t gptchat:latest . from_secret: ssh_username
- docker stop gptchat || true key:
- docker rm gptchat || true from_secret: ssh_private_key
- docker run -d --name gptchat -p 8484:8484 -v /opt/gptchat/data:/app/data --restart unless-stopped gptchat:latest 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