# image: https://hub.docker.com/r/frappe/erpnext-worker version: "3.8" services: erpnext-nginx: image: frappe/erpnext-nginx:${APP_VERSION} container_name: ${APP_NAME}-nginx restart: always ports: - ${APP_PORT}:8080 environment: - FRAPPE_PY=erpnext-python - FRAPPE_PY_PORT=8000 - FRAPPE_SOCKETIO=frappe-socketio - SOCKETIO_PORT=9000 - SKIP_NGINX_TEMPLATE_GENERATION=${SKIP_NGINX_TEMPLATE_GENERATION} volumes: - sites-vol:/var/www/html/sites:rw - assets-vol:/assets:rw erpnext-python: image: frappe/erpnext-worker:${APP_VERSION} container_name: ${APP_NAME}-worker restart: always environment: - MARIADB_HOST=${DB_MARIADB_HOST} - REDIS_CACHE=redis-cache:6379 - REDIS_QUEUE=redis-queue:6379 - REDIS_SOCKETIO=redis-socketio:6379 - SOCKETIO_PORT=9000 - AUTO_MIGRATE=1 - WORKER_CLASS=${WORKER_CLASS} volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw - assets-vol:/home/frappe/frappe-bench/sites/assets:rw frappe-socketio: image: frappe/frappe-socketio:${APP_VERSION} container_name: ${APP_NAME}-socketio restart: always depends_on: - redis-socketio volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw - logs-vol:/home/frappe/frappe-bench/logs:rw erpnext-worker-default: image: frappe/erpnext-worker:${APP_VERSION} container_name: ${APP_NAME}-worker-default restart: always command: worker depends_on: - redis-queue - redis-cache volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw - logs-vol:/home/frappe/frappe-bench/logs:rw erpnext-worker-short: image: frappe/erpnext-worker:${APP_VERSION} container_name: ${APP_NAME}-worker-short restart: always command: worker environment: - WORKER_TYPE=short depends_on: - redis-queue - redis-cache volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw - logs-vol:/home/frappe/frappe-bench/logs:rw erpnext-worker-long: image: frappe/erpnext-worker:${APP_VERSION} container_name: ${APP_NAME}-worker-long restart: always command: worker environment: - WORKER_TYPE=long depends_on: - redis-queue - redis-cache volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw erpnext-schedule: image: frappe/erpnext-worker:${APP_VERSION} container_name: ${APP_NAME}-schedule restart: always command: schedule depends_on: - redis-queue - redis-cache volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw - logs-vol:/home/frappe/frappe-bench/logs:rw redis-cache: image: redis:${DB_REDIS_VERSION} container_name: ${APP_NAME}-redis-cache restart: always volumes: - redis-cache-vol:/data redis-queue: image: redis:${DB_REDIS_VERSION} container_name: ${APP_NAME}-redis-queue restart: always volumes: - redis-queue-vol:/data redis-socketio: image: redis:${DB_REDIS_VERSION} container_name: ${APP_NAME}-redis-socketio restart: always volumes: - redis-socketio-vol:/data mariadb: image: mariadb:${DB_MARIADB_VERSION} container_name: ${APP_NAME}-db restart: always ports: - ${DB_MARIADB_PORT}:3306 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_MARIADB_PASSWORD} - MYSQL_INITDB_SKIP_TZINFO=1 volumes: - mariadb-vol:/var/lib/mysql site-creator: image: frappe/erpnext-worker:${APP_VERSION} container_name: ${APP_NAME}-site-creator restart: "no" command: new depends_on: - erpnext-python environment: - SITE_NAME=${APP_SITE_URL} - SITES=${APP_SITE_NAME} - DB_ROOT_USER=${DB_MRAIADB_USER} - MYSQL_ROOT_PASSWORD=${DB_MARIADB_PASSWORD} - ADMIN_PASSWORD=${APP_PASSWORD} - INSTALL_APPS=${APP_INSTALL_APPS} volumes: - sites-vol:/home/frappe/frappe-bench/sites:rw - logs-vol:/home/frappe/frappe-bench/logs:rw volumes: sites-vol: assets-vol: logs-vol: mariadb-vol: redis-cache-vol: redis-queue-vol: redis-socketio-vol: networks: default: name: "${APP_NAME}"