diff --git a/start.sh b/start.sh index 7afe486..e6163ba 100755 --- a/start.sh +++ b/start.sh @@ -671,9 +671,15 @@ RUN mkdir -p /app/storage /app/logs # Права доступа RUN chmod +x /app/app/main.py +# Переменные окружения для корректного запуска +ENV UVICORN_HOST=0.0.0.0 +ENV UVICORN_PORT=15100 +ENV API_HOST=0.0.0.0 +ENV API_PORT=15100 + EXPOSE 15100 -CMD ["python", "-m", "app.main"] +CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "15100"] EOF # Создание requirements.txt @@ -709,6 +715,7 @@ jinja2==3.1.2 starlette==0.27.0 structlog==23.2.0 aiogram==3.3.0 +sanic==23.12.1 EOF # Создание init_db.sql @@ -1390,6 +1397,10 @@ STORAGE_PATH=$STORAGE_DIR # API Configuration API_HOST=0.0.0.0 API_PORT=15100 +UVICORN_HOST=0.0.0.0 +UVICORN_PORT=15100 +FASTAPI_HOST=0.0.0.0 +FASTAPI_PORT=15100 # Docker Configuration DOCKER_SOCK_PATH=$DOCKER_SOCK_PATH @@ -1421,6 +1432,7 @@ EOF "created_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", "bootstrap_nodes": [ { + "id": "$NODE_ID", "node_id": "$NODE_ID", "address": "$(curl -s ifconfig.me || echo 'localhost')", "port": 15100,