4
0

Initial commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-15 00:33:06 +02:00
parent 758630f925
commit fd83e268ef
10 changed files with 115 additions and 27 deletions

View File

@ -1,28 +1,9 @@
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8-slim
FROM python:3
# Copy local code to the container image.
ENV APP_HOME /app
ENV PIP_NO_CACHE_DIR=true
ADD classification_service requirements.txt /classification_service/
WORKDIR /classification_service/
# Set timezone
ENV TZ Europe/Budapest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN pip3 install -r requirements.txt && pip3 install gunicorn
WORKDIR $APP_HOME
ARG RELEASE_ID
ENV RELEASE_ID ${RELEASE_ID:-""}
#Copy requirements to install
COPY requirements.txt ./
# Install production dependencies.
RUN pip install -r requirements.txt
COPY ./src ./src
EXPOSE 8080
ENTRYPOINT ["gunicorn", "-b", "0.0.0.0:8080", "--workers", "1", "--threads", "8", "app:app"]
EXPOSE 8000
CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]