yjdjt
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-04-04 14:12:40 +10:00
parent 2b3ce299f5
commit c7dd44f87d
4 changed files with 65 additions and 1 deletions

51
.drone.yml Normal file
View File

@@ -0,0 +1,51 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: python:3.11-slim
commands:
- pip install --no-cache-dir -r requirements.txt
- name: docker-build
image: plugins/docker
settings:
repo: 217.11.166.147:3000/admin/auth_bd
registry: http://217.11.166.147:3000
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
image: appleboy/drone-ssh
settings:
host: 217.11.166.147
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port: 22
script:
- docker stop auth_bd || true
- docker rm auth_bd || true
- docker pull 217.11.166.147:3000/admin/auth_bd:latest
- docker run -d --name auth_bd -p 8004:8004 217.11.166.147:3000/admin/auth_bd:latest
when:
branch:
- main
event:
- push
- custom

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8004
# Запуск с uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8004"]

View File

@@ -14,7 +14,7 @@ app = FastAPI(title="Work BD Auth API",
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=["https://allowlgroup.ru","http://localhost:5173", "http://45.129.78.228:8000"], # или список конкретных доменов allow_origins=["*"], # или список конкретных доменов
allow_credentials=True, allow_credentials=True,
allow_methods=["*"], allow_methods=["*"],
allow_headers=["*"], allow_headers=["*"],

Binary file not shown.