ssh
This commit is contained in:
32
.drone.yml
32
.drone.yml
@@ -10,23 +10,23 @@ steps:
|
|||||||
- pip install pytest pytest-asyncio
|
- pip install pytest pytest-asyncio
|
||||||
- pytest tests/ -v || true
|
- pytest tests/ -v || true
|
||||||
|
|
||||||
- name: build-and-deploy
|
- name: deploy
|
||||||
image: docker:latest
|
image: appleboy/drone-ssh
|
||||||
volumes:
|
settings:
|
||||||
- name: docker-socket
|
host: localhost
|
||||||
path: /var/run
|
username:
|
||||||
commands:
|
from_secret: ssh_username
|
||||||
- docker build -t gptchat:latest .
|
password:
|
||||||
- docker stop gptchat || true
|
from_secret: ssh_password
|
||||||
- docker rm gptchat || true
|
port: 22
|
||||||
- docker run -d --name gptchat -p 8484:8484 --restart unless-stopped gptchat:latest
|
script:
|
||||||
|
- 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
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: docker-socket
|
|
||||||
host:
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
Reference in New Issue
Block a user