To test that the work is done correctly, I would like torun the following commands:
export POSTGRES_PASSWORD=…..
export BOT_TOKEN=…
docker-compose up
docker-compose up
command must spinup the database server, apply all required migrations and run the telegram bot application.
No other actions is expected to be executed to make the bot up and ready.
currently i am using a .env
but i want to use docker to get the inputs of POSTGRES_PASSWORD and BOT_TOKEN.
so the user can be able to use their customized bot token and postgres password
version: '3'
services:
db:
image: postgres:latest
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: Telegram_Fliter_Bot
app:
build:
context: .
dockerfile: Dockerfile
restart: always
environment:
BOT_TOKEN: ${BOT_TOKEN}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
depends_on:
- db
i previously tried to use the .env but i want to get the credentials from the user
Shayan Naghash is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.