mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
feat(edge): scaffold config, requirements, Dockerfile
This commit is contained in:
@@ -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"]
|
||||
@@ -0,0 +1,5 @@
|
||||
[pytest]
|
||||
testpaths = tests
|
||||
python_files = test_*.py
|
||||
pythonpath = .
|
||||
addopts = -ra --strict-markers
|
||||
@@ -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
|
||||
@@ -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"))
|
||||
Reference in New Issue
Block a user