forked from docmarionum1/slack-archive-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (24 loc) · 955 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
33
34
FROM python:3.7-slim-buster
ARG slack_api_token
WORKDIR /app
# install requirements
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir /docker-entrypoint-initdb.d
# only if you want to add your historical data to the bot-archive database, add in your volume the directory
# called "directory-with-initial-export" with inside the export you downloaded https://get.slack.help/hc/en-us/articles/201658943-Export-your-team-s-Slack-history
# questo nel docker-entrypoint.sh: RUN [ "python", "import.py", "/docker-entrypoint-initdb.d" ]
COPY import.py ./
COPY archivebot.py ./
COPY docker-entrypoint.sh /usr/bin/
ENV SLACK_API_TOKEN $slack_api_token
# run
# CMD [ "python", "archivebot.py" ]
ENTRYPOINT [ "/usr/bin/docker-entrypoint.sh" ]
#
# docker run --volume $(pwd)/dump:/docker-entrypoint-initdb.d <image>
#
# if [ ! -f /var/lock/NON_DUE_VOLTE ]; then
# import.py
# touch /var/lock/NON_DUE_VOLTE
# fi