version: '3' services: base: &base image: chatwoot/chatwoot:latest env_file: .env ## Change this file for customized env variables volumes: - storage_data:/app/storage rails: <<: *base depends_on: - postgres - redis ports: - '127.0.0.1:3000: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: always sidekiq: <<: *base depends_on: - postgres - redis environment: - NODE_ENV=production - RAILS_ENV=production - INSTALLATION_ENV=docker command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml'] restart: always postgres: image: pgvector/pgvector:pg16 restart: always ports: - '127.0.0.1:5432:5432' volumes: - postgres_data:/var/lib/postgresql/data environment: - POSTGRES_DB=chatwoot - POSTGRES_USER=postgres # Please provide your own password. - POSTGRES_PASSWORD= redis: image: redis:alpine restart: always command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""] env_file: .env volumes: - redis_data:/data ports: - '127.0.0.1:6379:6379' # Optional: WhatsApp Calling media server (server-side WebRTC relay) # Uncomment to enable call persistence across page reloads and server-side recording. # media-server: # image: chatwoot/media-server:latest # env_file: .env # ports: # - '4000:4000' # - '10000-10100:10000-10100/udp' # environment: # - AUTH_TOKEN=${MEDIA_SERVER_AUTH_TOKEN} # - RAILS_CALLBACK_URL=http://rails:3000 # - RECORDINGS_DIR=/recordings # - LOG_LEVEL=info # - UDP_PORT_MIN=10000 # - UDP_PORT_MAX=10100 # - PUBLIC_IP=${MEDIA_SERVER_PUBLIC_IP} # - STUN_SERVERS=stun:stun.l.google.com:19302 # volumes: # - media_recordings:/recordings # restart: always # healthcheck: # test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:4000/health'] # interval: 10s # timeout: 5s # retries: 3 volumes: storage_data: postgres_data: redis_data: # media_recordings: