1.0.0 • Published 5 years ago
vitya v1.0.0
Installing
Go to the directory that has your Dockerfile and run the following command to build the Docker image. The -t flag lets you tag your image so it's easier to find later using the docker images command:
$ docker build -t <your username>/bot .
Run the image
$ docker run -p 8443:8443 -d <your username>/bot -e TOKEN='<TOKEN>' \
-e WEBHOOK='<WEBHOOK URL>' \
-e MAIL_HOST='<MAIL HOST>' \
-e MAIL_USER='<MAIL_USER>' \
-e MAIL_PASS='<MAIL_PASS>' \
-e SUBJECT='<SUBJECT>' \
-e MAIL_FROM='<MAIL_FROM>'
Print the output of your app:
# Get container ID
$ docker ps
# Print app output
$ docker logs <container id>
# Example
✅ Webhook installed successfully
✅ Commands installed successfully
git clone https://github.com/martiliones/Answering-machine-Telegram-Bot.git
cd Answering-machine-Telegram-Bot
npm i
TOKEN='' \ WEBHOOK='' \ MAIL_HOST='' \ MAIL_USER='<MAIL_USER>' \ MAIL_PASS='<MAIL_PASS>' \ SUBJECT='' \ MAIL_FROM='<MAIL_FROM>' node bot
1.0.0
5 years ago