-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (17 loc) · 859 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.10
# core metadata about this image
LABEL description="A simple Web service which acts as a bridge between the Prometheus Operator's ServiceMonitor objects, and external sites which normally can't be represented by a ServiceMonitor object."
LABEL version="1.0"
LABEL maintainer="Roger Howard <[email protected]>"
ENV PYTHONUNBUFFERED 1
ENV PROMDATE_ROOT="/opt/promdate"
RUN adduser --uid 1313 --home ${PROMDATE_ROOT} taskmaster
RUN pip install --upgrade pip && pip install pipenv
# copy src to working dir
COPY --chown=promdate:promdate ./app/ ${PROMDATE_ROOT}
# set working directory to app install
WORKDIR ${PROMDATE_ROOT}
# install promdate dependencies globally via pipenv
RUN pipenv install --deploy --system
USER promdate
CMD ["gunicorn", "--chdir", "/opt/promdate", "--bind", "0.0.0.0:5000", "--workers", "8", "promdate:app"]