Initial commit
Some checks failed
Run linters on applied template / Python 3.13 lint and build (push) Failing after 32s

This is a FastAPI backend microservice template used with `copier` utility.

Features of applied template are:
- Configuration file processing logic
- Metrics and tracing (both optional) configuration available
- Debug endpoints
- Database migration commands, prepared Alembic environment
- Database usage example in ping_db endpoint
- gitea sanity check pipeline
This commit is contained in:
2025-11-29 21:42:27 +03:00
commit 1a5b71b692
52 changed files with 4563 additions and 0 deletions

23
deploy/Dockerfile.jinja Normal file
View File

@@ -0,0 +1,23 @@
FROM python:3.14-slim
RUN groupadd --gid 1500 uvicorn && useradd uvicorn --gid 1500 --uid 1500
RUN apt update && apt install -y --no-install-recommends \
build-essential \
curl \
python3-dev && \
apt clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml README.md /app/
RUN mkdir {{project_slug}} && touch {{project_slug}}/__init__.py && pip install .
COPY {{project_slug}} /app/{{project_slug}}
RUN pip install .
USER uvicorn
CMD ["uvicorn", "{{project_slug}}.fastapi_init:app", "--host", "0.0.0.0", "--port", "8080"]