forked from M-Mueller/mattermost-poll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 844 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
28
29
30
31
32
FROM python:alpine
ARG port=5000
ARG mattermost_url="None"
ARG mattermost_tokens="None"
ARG mattermost_pa_token="None"
# Alternative: "http://<your-mattermost-url>:<poll-port>/img/bar.png"
ARG bar_img_url="\"https://raw.githubusercontent.com/M-Mueller/mattermost-poll/v1.1/img/bar.png\""
COPY requirements.txt /
RUN pip install -r requirements.txt
EXPOSE $port
RUN mkdir app app/volume
WORKDIR app
COPY *.py ./
COPY translations ./translations
COPY img ./img
COPY settings.py.example settings.py
RUN echo -e "\n\
DATABASE = \"volume/poll.db\"\n\
MATTERMOST_URL = $mattermost_url\n\
MATTERMOST_TOKENS = $mattermost_tokens\n\
MATTERMOST_PA_TOKEN = $mattermost_pa_token\n\
BAR_IMG_URL = $bar_img_url\n\
import logging\n\
logging.basicConfig(filename='volume/poll.log', level=logging.INFO)\n\
" >> settings.py
ENTRYPOINT ["python", "run.py"]