feat(edge): scaffold config, requirements, Dockerfile

This commit is contained in:
shay
2026-04-17 17:07:12 -04:00
parent a3c17a15da
commit 5ba5ec4f4b
4 changed files with 30 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY src ./src
EXPOSE 5003
CMD ["gunicorn", "-b", "0.0.0.0:5003", "-w", "2", "src.api:app"]
+5
View File
@@ -0,0 +1,5 @@
[pytest]
testpaths = tests
python_files = test_*.py
pythonpath = .
addopts = -ra --strict-markers
+7
View File
@@ -0,0 +1,7 @@
flask==3.0.3
flask-caching==2.3.0
flask-compress==1.15
requests==2.32.3
pytest==8.3.3
responses==0.25.3
gunicorn==23.0.0
+9
View File
@@ -0,0 +1,9 @@
import os
PORT = int(os.getenv("EDGE_PORT", "5003"))
GENERATOR_URL = os.getenv("GENERATOR_URL", "http://localhost:5002")
CACHE_TYPE = os.getenv("CACHE_TYPE", "SimpleCache")
CACHE_REDIS_URL = os.getenv("CACHE_REDIS_URL", "")
CACHE_DEFAULT_TIMEOUT = int(os.getenv("CACHE_DEFAULT_TIMEOUT", "86400"))
CACHE_THRESHOLD = int(os.getenv("CACHE_THRESHOLD", "10000"))
UPSTREAM_TIMEOUT = int(os.getenv("EDGE_UPSTREAM_TIMEOUT", "10"))