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