This commit is contained in:
2026-04-03 15:46:17 +10:00
parent 1f18b7a91f
commit d63b63723b

View File

@@ -11,12 +11,14 @@ steps:
- pytest tests/ -v || true - pytest tests/ -v || true
- name: build-image - name: build-image
image: docker:dind image: plugins/docker
privileged: true settings:
commands: repo: gptchat
- dockerd & tags:
- sleep 5 - latest
- docker build -t gptchat:latest . - ${DRONE_COMMIT_SHA:0:8}
dockerfile: Dockerfile
context: .
when: when:
branch: branch:
- main - main
@@ -24,19 +26,20 @@ steps:
- push - push
- name: deploy - name: deploy
image: docker:dind image: appleboy/drone-ssh
privileged: true settings:
commands: host: gitea.allowlgroup.ru
- dockerd & username:
- sleep 5 from_secret: ssh_username
- docker stop gptchat || true key:
- docker rm gptchat || true from_secret: ssh_private_key
- docker run -d \ port: 22
--name gptchat \ script:
-p 8484:8484 \ - cd /opt/gptchat || mkdir -p /opt/gptchat
-v $(pwd)/data:/app/data \ - cd /opt/gptchat && docker build -t gptchat:latest .
--restart unless-stopped \ - docker stop gptchat || true
gptchat:latest - 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