for aipmanager

This commit is contained in:
Zikil 2024-11-01 15:20:06 +07:00
parent eb493c9769
commit dc91d70569
28 changed files with 26 additions and 1 deletions

9
ecosystem.config.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
"apps" : [
{
"name" : "wanlanda.ru",
"script" : "main.py"
}
]
}

View File

@ -4,6 +4,8 @@ from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates from fastapi.templating import Jinja2Templates
from pydantic import BaseModel, EmailStr from pydantic import BaseModel, EmailStr
from aiogram import Bot, Dispatcher from aiogram import Bot, Dispatcher
from fastapi.middleware.wsgi import WSGIMiddleware
import uvicorn
BOT_TOKEN = '7102060229:AAE4SWmgKXkCBC482l8Ble5lKzlCV2YIWnM' BOT_TOKEN = '7102060229:AAE4SWmgKXkCBC482l8Ble5lKzlCV2YIWnM'
ID = '340394898' ID = '340394898'
@ -14,6 +16,9 @@ bot = Bot( # Образ Бота
app = FastAPI() app = FastAPI()
# Для совместимости с WSGI
application = WSGIMiddleware(app)
# Монтирование статических файлов # Монтирование статических файлов
app.mount("/static", StaticFiles(directory="app/static"), name="static") app.mount("/static", StaticFiles(directory="app/static"), name="static")
@ -102,4 +107,4 @@ Email: {form_data.email}
if __name__ == "__main__": if __name__ == "__main__":
import uvicorn import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000) uvicorn.run(app, host="0.0.0.0", port=20001)

11
passenger_wsgi.py Normal file
View File

@ -0,0 +1,11 @@
import sys
import os
INTERP = os.path.expanduser("/var/www/www-root/data/www/sybiko.ru/.venv/bin/python")
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
sys.path.append(os.getcwd())
from main import application

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 297 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 602 KiB

After

Width:  |  Height:  |  Size: 602 KiB

View File

Before

Width:  |  Height:  |  Size: 474 KiB

After

Width:  |  Height:  |  Size: 474 KiB

View File

Before

Width:  |  Height:  |  Size: 446 KiB

After

Width:  |  Height:  |  Size: 446 KiB

View File

Before

Width:  |  Height:  |  Size: 419 KiB

After

Width:  |  Height:  |  Size: 419 KiB

View File

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 316 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB