forked from tinode/chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
# Dockerfile builds an image with a chatbot (Tino) for Tinode. | ||
|
||
FROM python:3 | ||
|
||
ARG VERSION=0.14.4 | ||
ENV VERSION=$VERSION | ||
|
||
LABEL maintainer="Gene Sokolov <gene@tinode.co>" | ||
LABEL name="TinodeChatbot" | ||
LABEL version="0.14.1" | ||
LABEL version=$VERSION | ||
|
||
RUN mkdir -p /usr/src/bot | ||
WORKDIR /usr/src/bot | ||
|
||
COPY requirements.txt ./ | ||
COPY requirements.txt . | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN pip install --no-cache-dir -q -r requirements.txt | ||
|
||
ADD https://raw.githubusercontent.com/tinode/chat/master/chatbot/chatbot.py /usr/src/bot | ||
ADD https://raw.githubusercontent.com/tinode/chat/master/chatbot/quotes.txt /usr/src/bot | ||
ADD https://raw.githubusercontent.com/tinode/chat/master/pbx/model_pb2.py /usr/src/bot | ||
ADD https://raw.githubusercontent.com/tinode/chat/master/pbx/model_pb2_grpc.py /usr/src/bot | ||
# Get tarball with the chatbot code and data. | ||
ADD https://github.com/tinode/chat/releases/download/v$VERSION/chatbot.tar.gz . | ||
# Unpack chatbot, delete archive | ||
RUN tar -xzf chatbot.tar.gz \ | ||
&& rm chatbot.tar.gz | ||
|
||
# Use command line parameter `-e LOGIN_AS=user:password` to login as someone other than Tino. | ||
|
||
ENTRYPOINT python chatbot.py --login-basic=${LOGIN_AS} --login-cookie=/botdata/.tn-cookie --host=tinode-srv:16061 > log.txt | ||
ENTRYPOINT python chatbot.py --login-basic=${LOGIN_AS} --login-cookie=/botdata/.tn-cookie --host=tinode-srv:16061 > /var/log/chatbot.log | ||
|
||
# Plugin port | ||
EXPOSE 40051 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters