54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
bot:
|
|
build: .
|
|
container_name: pyrogram_bot
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env_prod
|
|
depends_on:
|
|
postgres:
|
|
condition: service_started
|
|
redis:
|
|
condition: service_started
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: postgres:13
|
|
container_name: postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "9151:5432"
|
|
volumes:
|
|
- ./docker/postgres/data:/var/lib/postgresql/data
|
|
- ./sql_scripts/create_table.sql:/docker-entrypoint-initdb.d/create_table.sql
|
|
|
|
redis:
|
|
image: redis:latest
|
|
container_name: redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
rabbitmq:
|
|
image: "rabbitmq:3-management"
|
|
container_name: rabbitmq
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9072:5672"
|
|
- "15672:15672"
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: test
|
|
RABBITMQ_DEFAULT_PASS: test
|
|
healthcheck:
|
|
test: ["CMD", "rabbitmq-diagnostics", "check_running"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|