config for Docker

This commit is contained in:
Bernhard Radermacher
2025-09-01 12:42:10 +00:00
parent 292e296f01
commit 904e3d2adf
5 changed files with 63 additions and 17 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM python:3
LABEL authors="Bernhard Radermacher"
RUN pip install fastapi mariadb pymysql passlib[bcrypt] pyjwt python-multipart sqlmodel uvicorn ldap3
ARG DB_USER="must be set"
ARG DB_PASSWORD="must be set"
ENV DB_USER=$DB_USER \
DB_PASSWORD=$DB_PASSWORD \
DB_HOST="mariadb.ctmapp.kiongroup.net" \
DB_PORT=3306 \
DB_DATABASE="fast_vpsx" \
LOG_LEVEL="INFO"
COPY app /
#ENTRYPOINT ["python", "main.py"]
#ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/usr/local/bin/uvicorn", "main:app", "--host", "0.0.0.0"]