feat(docker): embed git metadata and add greenlet async dependency
- Copy .git_api_info into container for git commit and branch tracking - Ignore generated .git_*_info in .gitignore - Add greenlet and SQLAlchemy[asyncio] to pyproject.toml for asyncpg engine support
This commit is contained in:
parent
29279bfd72
commit
d0487d7763
|
|
@ -28,5 +28,5 @@ htmlcov/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
# Generated Git Info
|
||||||
|
.git_*_info
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ COPY README.md ./
|
||||||
COPY docs/accupedia_db_v5.sql /app/schema/accupedia_db_v5.sql
|
COPY docs/accupedia_db_v5.sql /app/schema/accupedia_db_v5.sql
|
||||||
COPY app ./app
|
COPY app ./app
|
||||||
|
|
||||||
|
# Copy git info metadata if generated on host
|
||||||
|
COPY .git_api_info* /app/.git_api_info
|
||||||
|
|
||||||
# Install project and CLI scripts into PATH
|
# Install project and CLI scripts into PATH
|
||||||
RUN pip install --no-cache-dir -e .
|
RUN pip install --no-cache-dir -e .
|
||||||
|
|
||||||
|
|
@ -32,3 +35,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||||||
CMD curl -f http://localhost:8000/ || exit 1
|
CMD curl -f http://localhost:8000/ || exit 1
|
||||||
|
|
||||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ dependencies = [
|
||||||
"uvicorn[standard]>=0.20.0",
|
"uvicorn[standard]>=0.20.0",
|
||||||
"python-dotenv>=1.0.0",
|
"python-dotenv>=1.0.0",
|
||||||
"PyYAML>=6.0",
|
"PyYAML>=6.0",
|
||||||
"SQLAlchemy>=2.0.0",
|
"SQLAlchemy[asyncio]>=2.0.0",
|
||||||
|
"greenlet>=3.0.0",
|
||||||
"asyncpg>=0.28.0",
|
"asyncpg>=0.28.0",
|
||||||
"python-jose[cryptography]>=3.3.0",
|
"python-jose[cryptography]>=3.3.0",
|
||||||
"passlib[bcrypt]>=1.7.4",
|
"passlib[bcrypt]>=1.7.4",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue