Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ services:
build:
context: .
dockerfile: Dockerfile

command: ["bash", "/app/start.sh"]
restart: on-failure
restart: on-failure
depends_on:
- mongodb
networks:
- streamx-network

mongodb:
image: mongo:latest
container_name: mongodb-streamx
# ports:
# - "27017:27017" Uncomment if you want to access MongoDB from outside the Docker network (e.g., for development)
volumes:
- mongodb_data:/data/db
environment:
# IMPORTANT: Change these credentials BEFORE going to production!
# Make sure to update MONGO_URI in your config.py to match:
# MONGO_URI = "mongodb://admin:password@mongodb:27017/Stream"
# If you change these values below, update config.py with new credentials
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
networks:
- streamx-network
restart: on-failure

volumes:
mongodb_data:

networks:
streamx-network:
driver: bridge
35 changes: 26 additions & 9 deletions sample_config.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
BOT_TOKEN = ""
API_ID = 00000000
API_HASH = ""
MONGO_URI = ""
DATABASE_NAME = "Stream"
OWNER_ID = 100000000
SUDO_USERS = [100000000]
SECRET_KEY=""
FIREBASE_CREDENTIALS = ""
# - BOT_TOKEN: Get from @BotFather on Telegram (create a new bot).
# - API_ID & API_HASH: Get from https://my.telegram.org/auth (API Development tools).
# WARNING: Keep these secure! Never share or commit to version control.
BOT_TOKEN = "" # e.g., "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
API_ID = 00000000 # e.g., 12345678
API_HASH = "" # e.g., "abcdef1234567890abcdef1234567890"

# =============================================================================
# Database Configuration (MongoDB)
# =============================================================================
# Uncomment ONE option below based on your setup:

# Docker Compose (default)
MONGO_URI = "mongodb://admin:password@mongodb:27017/Stream"
# make sure docker-compose.yml has the same username/password and that the streamx-bot service has MONGO_URI in its environment variables

# MongoDB Atlas Cloud (comment out Docker option if using this)
# MONGO_URI = "mongodb+srv://username:password@cluster0.mongodb.net/Stream?retryWrites=true&w=majority"

DATABASE_NAME = "Stream"
OWNER_ID = 100000000 # e.g., 123456789
SUDO_USERS = [100000000] # e.g., [123456789, 987654321]


SECRET_KEY = "" # e.g., "your-super-secret-random-key-here"
FIREBASE_CREDENTIALS = "" # e.g., '{"type": "service_account", ...}'

# DEBUG
DEBUG = False
Expand Down