Initial commit
All checks were successful
Run linters on applied template / Python 3.13 lint and build (push) Successful in 1m0s
All checks were successful
Run linters on applied template / Python 3.13 lint and build (push) Successful in 1m0s
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:
23
deploy/Dockerfile.jinja
Normal file
23
deploy/Dockerfile.jinja
Normal 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"]
|
||||
Reference in New Issue
Block a user