Hi! After lots of trying I’ve set up the CRM locally with docker, however it looks like the email queue is not sending emails. I’ve already read a couple of blog posts about this problem but none of them helped with my issue. If I open the email queue and click on send manually, it sends it fine.
I also tried executing manually the frappe.email.queue.flush on the “Scheduled Job Type” page but it didn’t do anything. Besides configurator, all of my containers are running.
This is my docker-compose.yaml:
x-customizable-image: &customizable_image
image: ghcr.io/org/frappecrm:1.0.0
pull_policy: never
x-depends-on-configurator: &depends_on_configurator
depends_on:
configurator:
condition: service_completed_successfully
x-backend-defaults: &backend_defaults
<<: [*depends_on_configurator, *customizable_image]
volumes:
- sites:/home/frappe/frappe-bench/sites
services:
configurator:
<<: *backend_defaults
entrypoint:
- bash
- -c
command:
- >
ls -1 apps > sites/apps.txt;
bench set-config -g db_host $$DB_HOST;
bench set-config -gp db_port $$DB_PORT;
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
bench set-config -g redis_socketio "redis://$$REDIS_QUEUE";
bench set-config -gp socketio_port $$SOCKETIO_PORT;
environment:
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
DB_HOST: db
DB_PORT: 3306
SOCKETIO_PORT: 9000
depends_on:
- redis-cache
- redis-queue
- db
#condition: service_healthy
restart: on-failure
redis-cache:
image: redis:6.2-alpine
restart: unless-stopped
redis-queue:
image: redis:6.2-alpine
restart: unless-stopped
volumes:
- redis-queue-data:/data
db:
image: mariadb:10.6
healthcheck:
test: mysqladmin ping -h localhost --password=${DB_PASSWORD}
interval: 3s
retries: 20
restart: unless-stopped
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?No db password set}
volumes:
- db-data:/var/lib/mysql
backend:
<<: *backend_defaults
platform: linux/amd64
frontend:
<<: *customizable_image
platform: linux/amd64
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
SOCKETIO: websocket:9000
FRAPPE_SITE_NAME_HEADER: ${FRAPPE_SITE_NAME_HEADER:-$$host}
UPSTREAM_REAL_IP_ADDRESS: ${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1}
UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}
UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE:-off}
PROXY_READ_TIMEOUT: ${PROXY_READ_TIMEOUT:-120}
CLIENT_MAX_BODY_SIZE: ${CLIENT_MAX_BODY_SIZE:-50m}
volumes:
- sites:/home/frappe/frappe-bench/sites
depends_on:
- backend
- websocket
ports:
- "8000:8000"
websocket:
<<: [*depends_on_configurator, *customizable_image]
platform: linux/amd64
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
volumes:
- sites:/home/frappe/frappe-bench/sites
ports:
- "9000:9000"
queue-short:
<<: *backend_defaults
platform: linux/amd64
command: bench worker --queue short,default
depends_on:
- redis-queue
queue-long:
<<: *backend_defaults
platform: linux/amd64
command: bench worker --queue long,default,short
depends_on:
- redis-queue
scheduler:
<<: *backend_defaults
platform: linux/amd64
command: bench schedule
volumes:
redis-queue-data:
db-data:
sites:
I’m also having CORS issues, my web browser can’t access ws://127.0.0.1:9000/socket.io/?EIO=4&transport=websocket&sid=…
Forum posts that I’ve tried:
$ bench doctor
-----Checking scheduler status-----
Workers online: 2
-----crm.localhost Jobs-----
$ bench --site crm.localhost scheduler status
Scheduler is enabled for site crm.localhost
$ bench --site crm.localhost show-pending-jobs
-----Pending Jobs-----
$ bench show-pending-jobs
-----Pending Jobs-----
$
Any ideas how could I resolve this? What am I missing? Is the CORS issue related to this? (I’m interested in fixing that also)