diff --git a/apps/Dockerfile-tgbot b/apps/Dockerfile-tgbot new file mode 100644 index 0000000..73a52c6 --- /dev/null +++ b/apps/Dockerfile-tgbot @@ -0,0 +1,13 @@ +FROM python:3.8.3-alpine + +WORKDIR /usr/src/app +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 + +RUN apk update \ + && apk add gcc python3-dev musl-dev libffi-dev openssl-dev make + +COPY . . +WORKDIR tgbot/tgbot +RUN pip install --upgrade pip; pip install poetry; poetry config virtualenvs.create false; poetry install +CMD poetry shell; python bot.py diff --git a/docker-compose-tgbot.yml b/docker-compose-tgbot.yml new file mode 100644 index 0000000..4ed8556 --- /dev/null +++ b/docker-compose-tgbot.yml @@ -0,0 +1,8 @@ +version: "3.3" +services: + tgbot: + build: + context: ./apps + dockerfile: Dockerfile-tgbot + env_file: + - tgbot.env diff --git a/tgbot.env b/tgbot.env new file mode 100644 index 0000000..0497aa0 --- /dev/null +++ b/tgbot.env @@ -0,0 +1,10 @@ +TELEGRAM_BOT_TOKEN=change_bot_token + +INFLUX_DB=hostinfobotdb +INFLUX_HOST=localhost +INFLUX_PORT=8086 +INFLUX_PASSWORD=change_password +INFLUX_USERNAME=hostinfobot + +NOTIFICATION_BOT_TOKEN=change_bot_token +NOTIFICATION_USERS=12345,123456,1412321