должно работать
This commit is contained in:
57
.drone.yml
57
.drone.yml
@@ -3,11 +3,6 @@ type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
- name: test
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
@@ -15,42 +10,40 @@ steps:
|
||||
- pip install pytest pytest-asyncio
|
||||
- pytest tests/ -v || true
|
||||
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: gitea.allowlgroup.ru/allowlgroup/gptchat
|
||||
registry: https://gitea.allowlgroup.ru
|
||||
insecure: false
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:8}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
- name: build-image
|
||||
image: docker:latest
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
path: /var/run
|
||||
commands:
|
||||
- docker build -t gptchat:latest .
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
- custom
|
||||
|
||||
- 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:
|
||||
- ...
|
||||
image: docker:latest
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
path: /var/run
|
||||
commands:
|
||||
- docker stop gptchat || true
|
||||
- docker rm gptchat || true
|
||||
- docker run -d \
|
||||
--name gptchat \
|
||||
-p 8484:8484 \
|
||||
-v $(pwd)/data:/app/data \
|
||||
--restart unless-stopped \
|
||||
gptchat:latest
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
- custom
|
||||
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
Reference in New Issue
Block a user