for aipmanager
9
ecosystem.config.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
"apps" : [
|
||||||
|
{
|
||||||
|
"name" : "wanlanda.ru",
|
||||||
|
"script" : "main.py"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@ -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
@ -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
|
||||||
0
app/static/.DS_Store → static/.DS_Store
vendored
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 297 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 602 KiB After Width: | Height: | Size: 602 KiB |
|
Before Width: | Height: | Size: 474 KiB After Width: | Height: | Size: 474 KiB |
|
Before Width: | Height: | Size: 446 KiB After Width: | Height: | Size: 446 KiB |
|
Before Width: | Height: | Size: 419 KiB After Width: | Height: | Size: 419 KiB |
|
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 316 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |