Backend for Telegram Wishlist MiniApp
See more: https://github.com/grulex/telegram-wishlist-miniapp
Specify environment variables:
cp .env.example .env
Set you bot token and miniapp url in .env file:
TELEGRAM_BOT_TOKEN=YOU:TOKEN
TELEGRAM_MINI_APP_URL=https://t.me/NameYourBot/miniappName
Then you can start backend quickly with docker-compose:
docker-compose build && docker-compose up
Project will be available on http://localhost:8080
- Set up postgres database on your host
- Create base schema in database (run this sql queries: /sql/0_init.sql)
- Build and start image:
docker build -t telegram-wishlist-backend:latest .
When running the image, specify environment variables for Postgres:
docker run --rm -p 8080:8080 \
-e TELEGRAM_BOT_TOKEN='YOUR_BOT_TOKEN' \
-e TELEGRAM_MINI_APP_URL='https://t.me/NameYourBot/miniappName' \
-e PG_HOST='YOUR_PG_HOST' \
-e PG_PORT='YOUR_PG_PORT' \
-e PG_DATABASE='YOUR_PG_DATABASE' \
-e PG_USER='YOUR_PG_USER' \
-e PG_PASSWORD='YOUR_PG_PASSWORD' \
telegram-wishlist-backend:latest