init
This commit is contained in:
commit
1641912e55
5 changed files with 129 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Base Image für den Container - entsprechend der genutzten Python Version anpassen
|
||||
FROM python:3.10.13-bullseye
|
||||
|
||||
# Verhindert das Kopieren von pvc Dateien - relevant?
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
|
||||
# Sorft dafür, dass Python-Output zum Terminal geschickt wird
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# Updates und Installation der nötigen Software - entsprechend anpassen
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y build-essential \
|
||||
&& apt-get install -y libpq-dev \
|
||||
&& apt-get install -y gettext \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Kopiervorgang Host > Container
|
||||
COPY ./requirements.txt /requirements.txt
|
||||
|
||||
# Installation der Abhängigkeiten
|
||||
RUN pip install -r /requirements.txt --no-cache-dir
|
||||
|
||||
# Dir, von der die Befehle abgesetzt werden
|
||||
WORKDIR /app
|
||||
|
||||
# Uvicorn Befehl, um die App zu starten
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
Loading…
Add table
Add a link
Reference in a new issue