moved to single project
This commit is contained in:
51
api/Dockerfile
Normal file
51
api/Dockerfile
Normal file
@ -0,0 +1,51 @@
|
||||
FROM python:latest
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
|
||||
LABEL ImageName="registry.hottis.de/hv2/hv2-api"
|
||||
|
||||
ARG APP_DIR="/opt/app"
|
||||
ARG CONF_DIR="${APP_DIR}/config"
|
||||
|
||||
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y postgresql-client-common && \
|
||||
pip3 install psycopg2 && \
|
||||
pip3 install dateparser && \
|
||||
pip3 install connexion && \
|
||||
pip3 install connexion[swagger-ui] && \
|
||||
pip3 install uwsgi && \
|
||||
pip3 install flask-cors && \
|
||||
pip3 install python-jose[cryptography] && \
|
||||
pip3 install loguru && \
|
||||
pip3 install Cheetah3
|
||||
|
||||
|
||||
|
||||
RUN \
|
||||
mkdir -p ${APP_DIR} && \
|
||||
mkdir -p ${CONF_DIR} && \
|
||||
useradd -d ${APP_DIR} -u 1000 user
|
||||
|
||||
COPY *.py ${APP_DIR}/
|
||||
COPY openapi.yaml.tmpl ${APP_DIR}/
|
||||
COPY methods.py.tmpl ${APP_DIR}/
|
||||
COPY schema.json ${APP_DIR}/
|
||||
COPY server.ini ${CONF_DIR}/
|
||||
|
||||
WORKDIR ${APP_DIR}
|
||||
VOLUME ${CONF_DIR}
|
||||
|
||||
RUN \
|
||||
python3 generate.py
|
||||
|
||||
USER 1000:1000
|
||||
|
||||
EXPOSE 5000
|
||||
EXPOSE 9191
|
||||
|
||||
CMD [ "uwsgi", "./config/server.ini" ]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user