-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 773 Bytes
/
Dockerfile
File metadata and controls
26 lines (18 loc) · 773 Bytes
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
FROM python:3.8-slim-buster
ARG SERVICEBUS_CONNECTION_STR
ARG SERVICEBUS_SENSOR_TOPIC
ARG SERVICEBUS_ACTUATOR_TOPIC
ARG SERVICEBUS_SUBSCRIPTION_NAME
ENV SERVICEBUS_CONNECTION_STR=${SERVICEBUS_CONNECTION_STR}
ENV SERVICEBUS_SENSOR_TOPIC=${SERVICEBUS_SENSOR_TOPIC}
ENV SERVICEBUS_ACTUATOR_TOPIC=${SERVICEBUS_ACTUATOR_TOPIC}
ENV SERVICEBUS_SUBSCRIPTION_NAME=${SERVICEBUS_SUBSCRIPTION_NAME}
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . /app
RUN pip3 install pytest pytest-cov mock pytest-httpserver
RUN python -m pytest --cov-config=.coveragerc --cov=. --cov-branch --exitfirst --verbose --failed-first --cov-fail-under=70
RUN rm -rf /app/src/test
EXPOSE 8080
CMD [ "python3" , "src/main/app.py", "--profile", "prod"]