From 8a8251161857420049b7022f459dc56defa2c0ff Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Wed, 27 Jul 2022 18:20:58 +0300 Subject: [PATCH] add optional variables in .env.dist; remove *.db from .gitignore; add build command in docker-compose.yml --- .env.dist | 9 ++++++++- .gitignore | 3 --- docker-compose.yml | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.env.dist b/.env.dist index 6f87eb2..f435049 100644 --- a/.env.dist +++ b/.env.dist @@ -1 +1,8 @@ -RSSBOT_TG_TOKEN=1234567890:yourbotstoken \ No newline at end of file +RSSBOT_TG_TOKEN=1234567890:yourbotstoken + +# Optional variables +# RSSBOT_DSN=xxx +# POSTGRES_USER=xxx +# POSTGRES_PASSWORD=xxx +# POSTGRES_DB=xxx +# LOG_LEVEL=xxx \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7b73952..85e4d76 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,5 @@ /.venv /__pycache__ -# Database -/*.db - # Environment .env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 13d3b58..2f8241d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: '3.7' services: app: + build: . image: miroslavsckaya/tg_rss_bot environment: # DSN schema: postgres://username:password@hostname/database_name @@ -24,8 +25,8 @@ services: - "POSTGRES_PASSWORD=${BOT_DB_PASSWORD:-dev}" - "POSTGRES_DB=${BOT_DB_NAME:-bot}" volumes: - - postgres_bot_db:/var/lib/postgresql/data + - db-data:/var/lib/postgresql/data restart: unless-stopped volumes: - postgres_bot_db: + db-data: