LPgenerator / mattermost_bot

MatterBot - A chat bot for MatterMost (http://www.mattermost.org).
MIT License
211 stars 60 forks source link

Dockerfile? #41

Closed khusseini closed 7 years ago

khusseini commented 7 years ago

Hi there,

I was trying to set the matterbot up with a Dockerfile. I have the following

FROM·python:3-slim
RUN·pip·install·mattermost_bot
ADD·mattermost_bot_settings.py·/srv/mattermost_bot_settings.py
WORKDIR·/srv
ENTRYPOINT·["matterbot"]

I run the docker container like so:

docker run -e MATTERMOST_BOT_SETTINGS=mattermost_bot_settings mbot

It seems that the matterbot is not seeing my settings as it is trying to connect to www.example.com/api/v3 What am I doing wrong here?

khusseini commented 7 years ago

This way it works wonderfully

FROM python:3-slim

RUN pip install mattermost_bot

ADD mattermost_bot_settings.py /srv/mattermost_bot_settings.py
WORKDIR /srv

ENV MATTERMOST_BOT_SETTINGS_MODULE=mattermost_bot_settings

ENTRYPOINT ["matterbot"]