Skip to content

Commit 2ae466f

Browse files
authored
Merge pull request #39 from PyAr/dockefile
Dockefile
2 parents 1b3b1b5 + d8e4f87 commit 2ae466f

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@ ENV/
104104

105105
# mypy
106106
.mypy_cache/
107+
108+
# vscode
109+
.vscode

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3.8
2+
3+
USER root
4+
5+
COPY . /pycamp/telegram_bot
6+
WORKDIR /pycamp/telegram_bot
7+
RUN pip3 install -U .
8+
9+
CMD [ "python", "bin/run_bot.py" ]

docs/instalacion_entorno.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,18 @@ Para correr el bot ejecutá:
4949
5050
Y listo! Tu bot está corriendo en tu máquina, esperando que alguien le escriba por telegram.
5151
Para probarlo buscalo en telegram y mandale el comando `/start`
52+
53+
Ejecutar en un entorno dockerizado
54+
__________________________________
55+
56+
Para ejecutar el bot primero contruya la imagen:
57+
58+
.. code-block:: bash
59+
60+
docker build -t pycamp_bot:latest .
61+
62+
Ahora inicie el contenedor:
63+
64+
.. code-block:: bash
65+
66+
docker run -e "TOKEN=TOKEN_PERSONAL" -e "PYCAMP_BOT_MASTER_KEY=KEY" -v ./:/pycamp/telegram_bot --name pycamp_telegram_bot pycamp_bot

0 commit comments

Comments
 (0)