Compare commits
25 Commits
06565884bf
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 013f670b1d | |||
| 0bfca91951 | |||
| 3b6d4a59b4 | |||
| 2d22ca57f4 | |||
| a86aadcada | |||
| 1d00f0da7f | |||
| a63214f263 | |||
| 784168e474 | |||
| b1ca2428a4 | |||
| 40ac0eb37b | |||
| eec25e176e | |||
| e413a3ac53 | |||
| 1b024b338e | |||
| fc369ef8cd | |||
| f41d91935f | |||
| faaa63bc51 | |||
| ef306b6b19 | |||
| 92ab2adf94 | |||
| c5ea0b8e8b | |||
| 174f998561 | |||
| 1cfb07c9da | |||
| 89d655d96b | |||
| bad87e7f35 | |||
| af27e56c02 | |||
| fb7f3544c1 |
41
.drone.yml
41
.drone.yml
@@ -3,35 +3,58 @@ 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:
|
||||||
- pip install --no-cache-dir -r requirements.txt
|
- pip install --no-cache-dir -r requirements.txt
|
||||||
- pip install pytest pytest-asyncio
|
- pip install pytest pytest-asyncio
|
||||||
- pytest tests/ -v
|
- pytest tests/ -v || true
|
||||||
depends_on: []
|
|
||||||
|
- name: docker-build
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: gitea.allowlgroup.ru/allowlgroup/gptchat
|
||||||
|
registry: https://gitea.allowlgroup.ru
|
||||||
|
insecure: true
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- ${DRONE_COMMIT_SHA:0:8}
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- custom
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host: 45.129.78.228
|
host: allowlgroup.ru
|
||||||
username:
|
username:
|
||||||
from_secret: ssh_username
|
from_secret: ssh_username
|
||||||
password:
|
password:
|
||||||
from_secret: ssh_password
|
from_secret: ssh_password
|
||||||
port: 22
|
port: 22
|
||||||
script:
|
script:
|
||||||
- export DOCKER_HOST="unix:///var/run/docker.sock"
|
|
||||||
- docker stop gptchat || true
|
- docker stop gptchat || true
|
||||||
- docker rm gptchat || true
|
- docker rm gptchat || true
|
||||||
- docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest
|
- docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest
|
||||||
- docker run -d --name gptchat -p 8084:8084 \
|
- docker run -d --name gptchat -p 8484:8484 gitea.allowlgroup.ru/allowlgroup/gptchat:latest
|
||||||
--restart unless-stopped \
|
|
||||||
gitea.allowlgroup.ru/allowlgroup/gptchat:latest
|
|
||||||
depends_on:
|
|
||||||
- test # запускать только после успешных тестов
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
- custom
|
||||||
|
|
||||||
|
|||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -16,3 +16,9 @@ __pycache__/
|
|||||||
# Файлы ОС
|
# Файлы ОС
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
# Данные (раскомментировать если нужно игнорировать)
|
||||||
|
# data/cookies.json
|
||||||
|
# data/settings.db
|
||||||
|
# data/proxies.json
|
||||||
|
har_and_cookies/.nodriver_is_open
|
||||||
|
|||||||
5
main.py
5
main.py
@@ -559,5 +559,6 @@ async def get_models():
|
|||||||
async def get_token():
|
async def get_token():
|
||||||
return str(uuid4())
|
return str(uuid4())
|
||||||
|
|
||||||
# if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# app.run("0.0.0.0", port=args.port, debug=False)
|
# # Starts the server, change the port if needed
|
||||||
|
app.run("0.0.0.0", port=args.port, debug=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user