initial
This commit is contained in:
50
Dockerfile
Normal file
50
Dockerfile
Normal file
@ -0,0 +1,50 @@
|
||||
FROM python:latest
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
|
||||
LABEL ImageName="registry.hottis.de/wolutator/authservice"
|
||||
|
||||
ARG APP_DIR="/opt/app"
|
||||
ARG CONF_DIR="${APP_DIR}/config"
|
||||
|
||||
ENV DB_HOST="172.16.10.18"
|
||||
ENV DB_NAME="hausverwaltung"
|
||||
ENV DB_USER="hausverwaltung-ui"
|
||||
ENV DB_PASS="test123"
|
||||
ENV JWT_ISSUER='de.hottis.hausverwaltung'
|
||||
ENV JWT_SECRET='streng_geheim'
|
||||
ENV JWT_LIFETIME_SECONDS=60
|
||||
ENV JWT_ALGORITHM='HS256'
|
||||
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y libmariadbclient-dev && \
|
||||
pip3 install mariadb && \
|
||||
pip3 install dateparser && \
|
||||
pip3 install connexion && \
|
||||
pip3 install connexion[swagger-ui] && \
|
||||
pip3 install uwsgi && \
|
||||
pip3 install flask-cors && \
|
||||
pip3 install six && \
|
||||
pip3 install python-jose[cryptography]
|
||||
|
||||
RUN \
|
||||
mkdir -p ${APP_DIR} && \
|
||||
mkdir -p ${CONF_DIR} && \
|
||||
useradd -d ${APP_DIR} -u 1000 user
|
||||
|
||||
COPY *.py ${APP_DIR}/
|
||||
COPY openapi.yaml ${APP_DIR}/
|
||||
COPY server.ini ${CONF_DIR}/
|
||||
|
||||
USER 1000:1000
|
||||
WORKDIR ${APP_DIR}
|
||||
VOLUME ${CONF_DIR}
|
||||
|
||||
EXPOSE 5000
|
||||
EXPOSE 9191
|
||||
|
||||
CMD [ "uwsgi", "./config/server.ini" ]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user