# Chatwoot — self-hosted live chat # Документация: https://developers.chatwoot.com/self-hosted x-app: &app image: chatwoot/chatwoot:latest env_file: .env volumes: - storage_data:/app/storage services: rails: <<: *app depends_on: - postgres - redis - mailhog ports: - "127.0.0.1:3001:3000" environment: - NODE_ENV=production - RAILS_ENV=production - INSTALLATION_ENV=docker entrypoint: docker/entrypoints/rails.sh command: ["bundle", "exec", "rails", "s", "-p", "3000", "-b", "0.0.0.0"] restart: unless-stopped sidekiq: <<: *app depends_on: - postgres - redis - mailhog environment: - NODE_ENV=production - RAILS_ENV=production - INSTALLATION_ENV=docker command: ["bundle", "exec", "sidekiq", "-C", "config/sidekiq.yml"] restart: unless-stopped postgres: image: pgvector/pgvector:pg16 restart: unless-stopped volumes: - postgres_data:/var/lib/postgresql/data environment: - POSTGRES_DB=chatwoot - POSTGRES_USER=postgres - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD required} healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 mailhog: image: mailhog/mailhog:latest restart: unless-stopped ports: - "1025:1025" - "8025:8025" redis: image: redis:alpine restart: unless-stopped command: ["sh", "-c", "redis-server $${REDIS_PASSWORD:+--requirepass \"$$REDIS_PASSWORD\"}"] env_file: .env volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 volumes: storage_data: postgres_data: redis_data: