2022-07-26 18:07:34 +00:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
services:
|
2022-07-26 23:15:25 +00:00
|
|
|
app:
|
2022-07-27 15:20:58 +00:00
|
|
|
build: .
|
2022-07-26 19:38:38 +00:00
|
|
|
image: miroslavsckaya/tg_rss_bot
|
2022-07-26 18:07:34 +00:00
|
|
|
environment:
|
2022-07-26 19:38:38 +00:00
|
|
|
# DSN schema: postgres://username:password@hostname/database_name
|
|
|
|
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
2022-07-26 23:15:25 +00:00
|
|
|
- "RSSBOT_DSN=postgres://${BOT_DB_USER:-bot}:${BOT_DB_PASSWORD:-dev}@${BOT_DB_HOST:-db}/${BOT_DB_NAME:-bot}"
|
2022-07-26 19:38:38 +00:00
|
|
|
# https://core.telegram.org/bots#6-botfather
|
2022-07-26 23:15:25 +00:00
|
|
|
- "RSSBOT_TG_TOKEN=${RSSBOT_TG_TOKEN}"
|
2022-07-26 19:38:38 +00:00
|
|
|
# https://docs.python.org/3/howto/logging.html#logging-levels
|
2022-07-26 23:15:25 +00:00
|
|
|
- "LOG_LEVEL=${LOG_LEVEL:-INFO}"
|
2022-07-26 18:07:34 +00:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
2022-07-26 23:15:25 +00:00
|
|
|
restart: unless-stopped
|
2022-07-26 18:07:34 +00:00
|
|
|
|
2022-07-26 23:15:25 +00:00
|
|
|
db:
|
2022-07-26 18:07:34 +00:00
|
|
|
image: postgres:14-alpine
|
|
|
|
environment:
|
2022-07-26 19:38:38 +00:00
|
|
|
# Postgres settings
|
2022-07-26 23:15:25 +00:00
|
|
|
# https://hub.docker.com/_/postgres
|
|
|
|
- "POSTGRES_USER=${BOT_DB_USER:-bot}"
|
|
|
|
- "POSTGRES_PASSWORD=${BOT_DB_PASSWORD:-dev}"
|
|
|
|
- "POSTGRES_DB=${BOT_DB_NAME:-bot}"
|
2022-07-26 18:07:34 +00:00
|
|
|
volumes:
|
2022-07-27 15:20:58 +00:00
|
|
|
- db-data:/var/lib/postgresql/data
|
2022-07-26 23:15:25 +00:00
|
|
|
restart: unless-stopped
|
2022-07-26 18:07:34 +00:00
|
|
|
|
|
|
|
volumes:
|
2022-07-27 15:20:58 +00:00
|
|
|
db-data:
|