Мелкие правки
This commit is contained in:
56
docker-compose-example.yml
Normal file
56
docker-compose-example.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
networks:
|
||||
bot_network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
mongo_data:
|
||||
postgres_data:
|
||||
logs_data:
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
networks:
|
||||
- bot_network
|
||||
image: mongo:latest
|
||||
container_name: mongodb
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: USERNAME
|
||||
MONGO_INITDB_ROOT_PASSWORD: PASSWORD
|
||||
volumes:
|
||||
- mongo_data:/data/db
|
||||
|
||||
postgres:
|
||||
networks:
|
||||
- bot_network
|
||||
image: postgres:latest
|
||||
container_name: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: USER
|
||||
POSTGRES_PASSWORD: PASSWORD
|
||||
POSTGRES_DB: DB_NAME
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
bot:
|
||||
networks:
|
||||
- bot_network
|
||||
build:
|
||||
context: .
|
||||
container_name: telegram_bot
|
||||
environment:
|
||||
TOKEN: "TOKEN"
|
||||
POSTGRES_URL: "postgresql://USER:PASSWORD@postgres:5432/DB_NAME"
|
||||
MONGO_URL: "mongodb://USERNAME:PASSWORD@mongodb:27017"
|
||||
DB_NAME: "MONGO_DB_NAME"
|
||||
SERVER_COLLECTION: "COLLECTION IN MONGO DB "
|
||||
PLAN_COLLECTION: "COLLECTION IN MONGO DB"
|
||||
volumes:
|
||||
- logs_data:/app/logs
|
||||
depends_on:
|
||||
- postgres
|
||||
- mongodb
|
||||
command: ["python", "main.py"]
|
||||
Reference in New Issue
Block a user