Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c245ccb55b | ||
|
|
ba348eb639 | ||
|
|
f6ce39f7c1 | ||
|
|
4732a97611 |
+11
-2
@@ -1,11 +1,20 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11-slim AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
|
pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN rm -rf /root/.cache
|
||||||
|
|
||||||
CMD ["python", "main.py"]
|
CMD ["python", "main.py"]
|
||||||
|
|||||||
@@ -105,13 +105,6 @@ async def on_startup_configured(dispatcher: Dispatcher):
|
|||||||
telegram_webhook_url_to_set = getattr(settings,
|
telegram_webhook_url_to_set = getattr(settings,
|
||||||
'TELEGRAM_WEBHOOK_BASE_URL', None)
|
'TELEGRAM_WEBHOOK_BASE_URL', None)
|
||||||
if telegram_webhook_url_to_set:
|
if telegram_webhook_url_to_set:
|
||||||
if settings.BOT_TOKEN in telegram_webhook_url_to_set:
|
|
||||||
logging.error(
|
|
||||||
f"CRITICAL SECURITY RISK: Bot token detected in TELEGRAM_WEBHOOK_BASE_URL ('{telegram_webhook_url_to_set}'). "
|
|
||||||
"This is a major security vulnerability. Webhook will NOT be set."
|
|
||||||
)
|
|
||||||
full_telegram_webhook_url = "ERROR_URL_TOKEN_DETECTED"
|
|
||||||
else:
|
|
||||||
full_telegram_webhook_url = f"{str(telegram_webhook_url_to_set).rstrip('/')}/{settings.BOT_TOKEN}"
|
full_telegram_webhook_url = f"{str(telegram_webhook_url_to_set).rstrip('/')}/{settings.BOT_TOKEN}"
|
||||||
|
|
||||||
logging.info(
|
logging.info(
|
||||||
|
|||||||
+2
-1
@@ -12,9 +12,10 @@ services:
|
|||||||
- ./locales:/app/locales
|
- ./locales:/app/locales
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
remnawave-tg-shop-db:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
container_name: remnawave-tg-shop-db
|
container_name: remnawave-tg-shop-db
|
||||||
|
hostname: remnawave-tg-shop-db
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
aiogram==3.20.0
|
aiogram==3.20.0
|
||||||
python-dotenv==1.0.1
|
python-dotenv==1.0.1
|
||||||
aiohttp==3.9.5
|
aiohttp==3.10.11
|
||||||
pydantic==2.7.1
|
pydantic==2.7.1
|
||||||
yookassa==3.5.0
|
yookassa==3.5.0
|
||||||
pycountry==23.12.11
|
pycountry==23.12.11
|
||||||
|
|||||||
Reference in New Issue
Block a user