remove invalid values in docker-compose.yml and add little documentation for environment values
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
mitsuha_s 2022-07-26 19:38:38 +00:00
parent dcc7dda040
commit a3327a505c
2 changed files with 19 additions and 10 deletions

View file

@ -8,6 +8,14 @@ RUN pip install -r requirements.txt
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
# App settings
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
ENV RSSBOT_DSN=postgres://username:password@hostname/database_name
# https://core.telegram.org/bots#6-botfather
ENV RSSBOT_TG_TOKEN=1234567890:yourbotstoken
# https://docs.python.org/3/howto/logging.html#logging-levels
ENV LOG_LEVEL=INFO
ENTRYPOINT [ "python" ] ENTRYPOINT [ "python" ]
CMD [ "bot.py" ] CMD [ "bot.py" ]

View file

@ -2,24 +2,25 @@ version: '3.7'
services: services:
rss-bot: rss-bot:
build: . image: miroslavsckaya/tg_rss_bot
image: rss_bot
# App settings
# DSN schema: postgres://username:password@hostname/database_name
environment: environment:
- RSSBOT_DSN=xxx # DSN schema: postgres://username:password@hostname/database_name
- RSSBOT_TG_TOKEN=xxx # https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
- LOG_LEVEL=INFO - "RSSBOT_DSN=${BOT_DSN}"
# https://core.telegram.org/bots#6-botfather
- "RSSBOT_TG_TOKEN=${BOT_TOKEN}"
# https://docs.python.org/3/howto/logging.html#logging-levels
- "LOG_LEVEL=${BOT_LOG_LEVEL:-INFO}"
container_name: rss_bot container_name: rss_bot
depends_on: depends_on:
- postgres - postgres
postgres: postgres:
image: postgres:14-alpine image: postgres:14-alpine
# Postgres settings.
# Can use POSTGRES_DB variable. https://hub.docker.com/_/postgres
environment: environment:
- POSTGRES_PASSWORD=xxx # Postgres settings
# Can use POSTGRES_DB variable. https://hub.docker.com/_/postgres
- "POSTGRES_PASSWORD=${POSTGRES_PASS}"
volumes: volumes:
- postgres_bot_db:/var/lib/postgresql/data - postgres_bot_db:/var/lib/postgresql/data