add default values from environment variables
This commit is contained in:
parent
a3327a505c
commit
7e466a9384
|
@ -1,28 +1,31 @@
|
||||||
version: '3.7'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
rss-bot:
|
app:
|
||||||
image: miroslavsckaya/tg_rss_bot
|
image: miroslavsckaya/tg_rss_bot
|
||||||
environment:
|
environment:
|
||||||
# DSN schema: postgres://username:password@hostname/database_name
|
# DSN schema: postgres://username:password@hostname/database_name
|
||||||
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
||||||
- "RSSBOT_DSN=${BOT_DSN}"
|
- "RSSBOT_DSN=postgres://${BOT_DB_USER:-bot}:${BOT_DB_PASSWORD:-dev}@${BOT_DB_HOST:-db}/${BOT_DB_NAME:-bot}"
|
||||||
# https://core.telegram.org/bots#6-botfather
|
# https://core.telegram.org/bots#6-botfather
|
||||||
- "RSSBOT_TG_TOKEN=${BOT_TOKEN}"
|
- "RSSBOT_TG_TOKEN=${RSSBOT_TG_TOKEN}"
|
||||||
# https://docs.python.org/3/howto/logging.html#logging-levels
|
# https://docs.python.org/3/howto/logging.html#logging-levels
|
||||||
- "LOG_LEVEL=${BOT_LOG_LEVEL:-INFO}"
|
- "LOG_LEVEL=${LOG_LEVEL:-INFO}"
|
||||||
container_name: rss_bot
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
db:
|
||||||
image: postgres:14-alpine
|
image: postgres:14-alpine
|
||||||
environment:
|
environment:
|
||||||
# Postgres settings
|
# Postgres settings
|
||||||
# Can use POSTGRES_DB variable. https://hub.docker.com/_/postgres
|
# https://hub.docker.com/_/postgres
|
||||||
- "POSTGRES_PASSWORD=${POSTGRES_PASS}"
|
- "POSTGRES_USER=${BOT_DB_USER:-bot}"
|
||||||
|
- "POSTGRES_PASSWORD=${BOT_DB_PASSWORD:-dev}"
|
||||||
|
- "POSTGRES_DB=${BOT_DB_NAME:-bot}"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_bot_db:/var/lib/postgresql/data
|
- postgres_bot_db:/var/lib/postgresql/data
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_bot_db:
|
postgres_bot_db:
|
||||||
|
|
Loading…
Reference in a new issue