- Extract useDragDrop.js (drag/drop, block move, resize) - Extract useSelection.js (lasso, multi-select, hover linking) - Extract WeekCalendar.vue, MonthCalendar.vue, RightPanel.vue - DispatchV2Page.vue: 3018 → 1438 lines (orchestration only) - Remove <style scoped> — styles cascade to child components - Add .dockerignore (build context 214MB → 112KB) - Add infra/ with docker-compose reference and .env.example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
139 lines
3.7 KiB
YAML
139 lines
3.7 KiB
YAML
# ERPNext Docker Compose — reference config for rebuilding infrastructure
|
|
# Based on frappe_docker: https://github.com/frappe/frappe_docker
|
|
#
|
|
# Usage:
|
|
# cp .env.example .env (edit vars)
|
|
# docker compose -f docker-compose.erpnext.yaml up -d
|
|
#
|
|
# After ERPNext is running, deploy the dispatch PWA:
|
|
# cd ../dispatch-app && bash deploy.sh
|
|
|
|
x-customizable-image: &customizable_image
|
|
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-v15.49.2}
|
|
pull_policy: ${PULL_POLICY:-always}
|
|
restart: unless-stopped
|
|
|
|
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
|
|
platform: linux/amd64
|
|
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:
|
|
DB_HOST: ${DB_HOST:-db}
|
|
DB_PORT: ${DB_PORT:-3306}
|
|
REDIS_CACHE: ${REDIS_CACHE:-redis-cache:6379}
|
|
REDIS_QUEUE: ${REDIS_QUEUE:-redis-queue:6379}
|
|
SOCKETIO_PORT: 9000
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis-cache:
|
|
condition: service_started
|
|
redis-queue:
|
|
condition: service_started
|
|
restart: on-failure
|
|
|
|
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: $$host
|
|
PROXY_READ_TIMEOUT: 120
|
|
CLIENT_MAX_BODY_SIZE: 50m
|
|
volumes:
|
|
- sites:/home/frappe/frappe-bench/sites
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- backend
|
|
- websocket
|
|
|
|
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
|
|
|
|
queue-short:
|
|
<<: *backend_defaults
|
|
platform: linux/amd64
|
|
command: bench worker --queue short,default
|
|
|
|
queue-long:
|
|
<<: *backend_defaults
|
|
platform: linux/amd64
|
|
command: bench worker --queue long,default,short
|
|
|
|
scheduler:
|
|
<<: *backend_defaults
|
|
platform: linux/amd64
|
|
command: bench schedule
|
|
|
|
db:
|
|
image: mariadb:10.11
|
|
platform: linux/amd64
|
|
restart: unless-stopped
|
|
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--skip-character-set-client-handshake']
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-admin}
|
|
volumes:
|
|
- db-data:/var/lib/mysql
|
|
healthcheck:
|
|
test: mysqladmin ping -h localhost --password=$$MYSQL_ROOT_PASSWORD
|
|
interval: 5s
|
|
retries: 10
|
|
|
|
redis-cache:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
|
|
redis-queue:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
|
|
# PostgreSQL for address autocomplete (rqa_addresses table)
|
|
postgres:
|
|
image: postgres:14-alpine
|
|
platform: linux/amd64
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${PG_DB:-dispatch}
|
|
POSTGRES_USER: ${PG_USER:-dispatch}
|
|
POSTGRES_PASSWORD: ${PG_PASSWORD:-dispatch}
|
|
volumes:
|
|
- pg-data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
volumes:
|
|
sites:
|
|
db-data:
|
|
pg-data:
|