-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (23 loc) · 704 Bytes
/
Dockerfile
File metadata and controls
37 lines (23 loc) · 704 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
27
28
29
30
31
32
33
34
35
36
37
FROM python:3.8.1-buster
RUN adduser user
WORKDIR /home/websocket_timer
############################
# poetry
# https://stackoverflow.com/questions/53835198/integrating-python-poetry-with-docker
ENV POETRY_VERSION=1.1.13
RUN pip install "poetry==$POETRY_VERSION"
COPY poetry.lock pyproject.toml /home/websocket_timer/
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
############################
# project files
COPY app app
COPY migrations migrations
COPY websocket_timer.py config.py boot.sh ./
RUN chmod +x boot.sh
ENV FLASK_APP websocket_timer.py
RUN chown -R user:user ./
############################
USER user
EXPOSE 5000
CMD [ "./boot.sh" ]