15 lines
424 B
Django/Jinja
15 lines
424 B
Django/Jinja
FROM {{ base_image | default("python:3.11-slim") }}
|
|
WORKDIR /app
|
|
COPY . /app
|
|
|
|
{% set pip_opts = "" %}
|
|
{% if pip_registry %}
|
|
{% set pip_opts = "--index-url " ~ pip_registry %}
|
|
{% endif %}
|
|
|
|
RUN pip install --no-cache-dir -U pip
|
|
RUN pip install --no-cache-dir {{ pip_opts }} uvicorn fastapi
|
|
RUN pip install --no-cache-dir {{ pip_opts }} -r requirements.txt
|
|
|
|
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "80"]
|