Last active
April 13, 2019 10:01
-
-
Save justingood/020e24222fa1653f5cd0 to your computer and use it in GitHub Desktop.
An example to set up a Telegram bot in Docker
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
tg: | |
image: justingood/tg | |
ports: | |
- "4458:4458" | |
#Expose the telegram-cli as a volume | |
volumes: | |
- .telegram-cli:/root/.telegram-cli | |
bot: | |
#Build using local Dockerfile | |
build: . | |
#Link to the tg container | |
links: | |
- tg | |
#Mount the local dev directory into the /app dir in the container so we can test while we develop. | |
volumes: | |
- .:/app |
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
FROM python:3.5 | |
WORKDIR /app | |
COPY requirements.txt /app/ | |
RUN pip install -r requirements.txt | |
COPY . /app/ | |
CMD python bot.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should that run as root? On normal environments you try to avoid that for server like instances. Is that save in docker?