fix: install system CA certs in Docker instead of certifi
Browse files- Dockerfile +2 -0
- main.py +2 -3
- requirements.txt +0 -1
Dockerfile
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
COPY requirements.txt .
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 4 |
+
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
COPY requirements.txt .
|
main.py
CHANGED
|
@@ -5,7 +5,6 @@ import httpx
|
|
| 5 |
import asyncio
|
| 6 |
import time
|
| 7 |
import re
|
| 8 |
-
import certifi
|
| 9 |
import jwt
|
| 10 |
import logging
|
| 11 |
from jwt import PyJWKClient
|
|
@@ -91,7 +90,7 @@ async def fetch_bcv() -> dict:
|
|
| 91 |
"Accept-Language": "es-VE,es;q=0.9",
|
| 92 |
}
|
| 93 |
|
| 94 |
-
async with httpx.AsyncClient(timeout=15, follow_redirects=True
|
| 95 |
response = await client.get("https://www.bcv.org.ve/", headers=headers)
|
| 96 |
response.raise_for_status()
|
| 97 |
|
|
@@ -147,7 +146,7 @@ async def fetch_p2p() -> dict:
|
|
| 147 |
"classifies": ["mass", "profession"],
|
| 148 |
}
|
| 149 |
|
| 150 |
-
async with httpx.AsyncClient(timeout=10
|
| 151 |
buy_res, sell_res = await asyncio.gather(
|
| 152 |
client.post(
|
| 153 |
"https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search",
|
|
|
|
| 5 |
import asyncio
|
| 6 |
import time
|
| 7 |
import re
|
|
|
|
| 8 |
import jwt
|
| 9 |
import logging
|
| 10 |
from jwt import PyJWKClient
|
|
|
|
| 90 |
"Accept-Language": "es-VE,es;q=0.9",
|
| 91 |
}
|
| 92 |
|
| 93 |
+
async with httpx.AsyncClient(timeout=15, follow_redirects=True) as client:
|
| 94 |
response = await client.get("https://www.bcv.org.ve/", headers=headers)
|
| 95 |
response.raise_for_status()
|
| 96 |
|
|
|
|
| 146 |
"classifies": ["mass", "profession"],
|
| 147 |
}
|
| 148 |
|
| 149 |
+
async with httpx.AsyncClient(timeout=10) as client:
|
| 150 |
buy_res, sell_res = await asyncio.gather(
|
| 151 |
client.post(
|
| 152 |
"https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search",
|
requirements.txt
CHANGED
|
@@ -4,4 +4,3 @@ httpx==0.28.1
|
|
| 4 |
PyJWT[crypto]==2.10.1
|
| 5 |
beautifulsoup4==4.12.3
|
| 6 |
lxml==5.3.0
|
| 7 |
-
certifi==2024.12.14
|
|
|
|
| 4 |
PyJWT[crypto]==2.10.1
|
| 5 |
beautifulsoup4==4.12.3
|
| 6 |
lxml==5.3.0
|
|
|