77 lines
1.6 KiB
YAML
77 lines
1.6 KiB
YAML
|
|
networks:
|
|
bot_network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
mongo_data:
|
|
postgres_data:
|
|
logs_data:
|
|
|
|
services:
|
|
# MongoDB
|
|
mongodb:
|
|
networks:
|
|
- bot_network
|
|
image: mongo:latest
|
|
container_name: mongodb
|
|
ports:
|
|
- "27017:27017"
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: root
|
|
MONGO_INITDB_ROOT_PASSWORD: itOj4CE2miKR
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
|
|
# PostgreSQL
|
|
postgres:
|
|
networks:
|
|
- bot_network
|
|
image: postgres:latest
|
|
container_name: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: AH3J9GSPBYOP
|
|
POSTGRES_PASSWORD: uPS9?y~mcu2
|
|
POSTGRES_DB: bot_db
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
# Бэкенд (FastAPI)
|
|
backend:
|
|
networks:
|
|
- bot_network
|
|
build:
|
|
context: ./Flask-Backend-All
|
|
dockerfile: Dockerfile
|
|
container_name: backend
|
|
environment:
|
|
POSTGRES_URL: "postgresql+asyncpg://AH3J9GSPBYOP:uPS9?y~mcu2@postgres:5432/bot_db"
|
|
MONGO_URL: "mongodb://root:itOj4CE2miKR@mongodb:27017"
|
|
DB_NAME: "MongoDBSub&Ser"
|
|
SERVER_COLLECTION: "servers"
|
|
PLAN_COLLECTION: "plans"
|
|
BASE_URL: "http://backend:8000"
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
- postgres
|
|
- mongodb
|
|
|
|
# Telegram Bot
|
|
bot:
|
|
networks:
|
|
- bot_network
|
|
build:
|
|
context: ./Lark_VPN_Bot
|
|
dockerfile: Dockerfile
|
|
container_name: telegram_bot
|
|
environment:
|
|
BASE_URL: "http://backend:8000"
|
|
TOKEN: "8104061818:AAGJ6H1PTFmfJm-_mZqGv7EnHxGl4dZndnU"
|
|
volumes:
|
|
- logs_data:/app/logs
|
|
depends_on:
|
|
- backend
|