Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AmiraliNotFound/dummy-gemini-bot/llms.txt

Use this file to discover all available pages before exploring further.

Dummy Gemini Bot supports two deployment strategies on Linux. Docker Compose (recommended) is the simplest path — it handles all system dependencies, the React frontend build, and process management in one command. Systemd gives you a bare-metal installation if you prefer to manage the Python process directly on the host without containers.

Setting Up HTTPS for the Admin WebApp (Cloudflare Tunnel)

Telegram requires all Mini App WebApps to be served over HTTPS. The easiest way to satisfy this requirement without managing SSL certificates is a free Cloudflare Tunnel, which creates a secure public HTTPS endpoint that proxies traffic to your local port 8080.
1

Point your domain to localhost:8080 in Cloudflare

In your Cloudflare dashboard, create a tunnel or DNS rule that routes your chosen subdomain (e.g. admin.yourdomain.com) to http://localhost:8080.
2

Set WEBAPP_URL in your .env file

Add your public HTTPS URL to .env:
WEBAPP_URL=https://admin.yourdomain.com
3

Restart the bot

Apply the change by restarting:
# Docker
docker-compose down && docker-compose up -d

# Systemd
sudo systemctl restart gemini-bot.service
4

Open the dashboard

Send /admin in Telegram. The bot will now display a 🚀 Open Admin Dashboard inline button that launches the React Mini App inside Telegram.
If WEBAPP_URL is not set in your .env file, the /admin inline button will not appear in the bot’s response. The REST API will still run on port 8080, but the Telegram Mini App entry point requires a valid public HTTPS URL to function.

Docker Compose Reference

The full docker-compose.yml used by the project:
services:
  bot:
    build: .
    container_name: dummy_gemini_bot
    restart: always
    env_file:
      - .env
    volumes:
      - ./data:/app/data
    environment:
      - DB_FILE=/app/data/chat_history.db
    ports:
      - "8080:8080"
Key points:
  • restart: always — the container restarts automatically on failure or system reboot.
  • env_file: .env — loads all variables from your .env file into the container environment.
  • volumes: ./data:/app/data — mounts the local ./data directory for database and config persistence.
  • environment: DB_FILE=... — overrides the database path to the mounted volume location.
  • ports: 8080:8080 — exposes the Admin WebApp API to the host network.

Dockerfile Overview

The project uses a two-stage Docker build to keep the final image lean while fully automating the frontend compilation: Stage 1 — Frontend builder (node:20-alpine):
  • Sets the working directory to /app/webapp
  • Copies package.json / package-lock.json and runs npm install
  • Copies the full webapp/ source tree and runs npm run build
  • Produces compiled static assets in /app/webapp/dist
Stage 2 — Python runtime (python:3.11-slim):
  • Installs build-essential and ffmpeg via apt-get (provides ffprobe as well)
  • Copies the Deno binary directly from denoland/deno:bin into /usr/local/bin/deno — this is the JavaScript runtime used by yt-dlp for sites requiring JS evaluation
  • Installs all Python dependencies from requirements.txt with pip install --no-cache-dir
  • Copies the src/ package and main.py entry point
  • Copies the compiled frontend assets from Stage 1 into ./webapp/dist
  • Exposes port 8080 and sets the default command to python main.py
This approach means the Node.js toolchain is never present in the final running image, resulting in a smaller and more secure production container.

Build docs developers (and LLMs) love