docbot/docker-compose.yml

78 lines
1.6 KiB
YAML

services:
db:
image: postgres:17
restart: unless-stopped
env_file:
- .env_db
volumes:
- db_data:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d:ro
networks:
- docbot-network
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
hostname: postgres
container_name: db
profiles:
- production
- development
chat:
build:
context: .
dockerfile: docker/chatbot/Dockerfile
restart: unless-stopped
environment:
- BOT_TOKEN=${BOT_TOKEN}
- DATABASE_URL=${DATABASE_URL}
- LOGGING_LEVEL=${LOGGING_LEVEL:-INFO}
- PRODAMUS_TOKEN=${PRODAMUS_TOKEN}
volumes:
- ./data:/app/data:rw
- ./.env:/app/.env
- ./.env_db:/app/.env_db
depends_on:
db:
condition: service_healthy
networks:
- docbot-network
hostname: chatbot
container_name: chatbot
profiles:
- production
- development
- chat_only
webhook:
build:
context: .
dockerfile: docker/webhook/Dockerfile
restart: unless-stopped
environment:
- BOT_TOKEN=${BOT_TOKEN}
- DATABASE_URL=${DATABASE_URL}
- LOGGING_LEVEL=${LOGGING_LEVEL:-INFO}
- PRODAMUS_TOKEN=${PRODAMUS_TOKEN}
ports:
- "127.0.0.1:8089:8089"
depends_on:
db:
condition: service_healthy
networks:
- docbot-network
container_name: webhook
profiles:
- production
- development
- chat_only
networks:
docbot-network:
driver: bridge
volumes:
db_data: