From f1bbde45a86affa7d647ef1133abf185452f41f9 Mon Sep 17 00:00:00 2001 From: Avey777 <35259040+Avey777@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:47:10 +0800 Subject: [PATCH] Add Erpnext (#174) * Add redash * add ApacheDoris * add ApacheDoris * Add erpnext * Add erpnext --- apps/erpnext/14.28.0/data.yml | 9 + apps/erpnext/14.28.0/docker-compose.yml | 221 ++++++++++++++++++++++++ apps/erpnext/README.md | 21 +++ apps/erpnext/data.yml | 20 +++ apps/erpnext/logo.png | Bin 0 -> 745 bytes 5 files changed, 271 insertions(+) create mode 100644 apps/erpnext/14.28.0/data.yml create mode 100644 apps/erpnext/14.28.0/docker-compose.yml create mode 100644 apps/erpnext/README.md create mode 100644 apps/erpnext/data.yml create mode 100644 apps/erpnext/logo.png diff --git a/apps/erpnext/14.28.0/data.yml b/apps/erpnext/14.28.0/data.yml new file mode 100644 index 00000000..cd184f7e --- /dev/null +++ b/apps/erpnext/14.28.0/data.yml @@ -0,0 +1,9 @@ +additionalProperties: + formFields: + - default: 8080 + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/erpnext/14.28.0/docker-compose.yml b/apps/erpnext/14.28.0/docker-compose.yml new file mode 100644 index 00000000..5b03083d --- /dev/null +++ b/apps/erpnext/14.28.0/docker-compose.yml @@ -0,0 +1,221 @@ +version: "3" + +services: + backend: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + configurator: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: none + 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_SOCKETIO"; + bench set-config -gp socketio_port $$SOCKETIO_PORT; + environment: + DB_HOST: db + DB_PORT: "3306" + REDIS_CACHE: redis-cache:6379 + REDIS_QUEUE: redis-queue:6379 + REDIS_SOCKETIO: redis-socketio:6379 + SOCKETIO_PORT: "9000" + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + + create-site: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: none + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + entrypoint: + - bash + - -c + command: + - > + wait-for-it -t 120 db:3306; + wait-for-it -t 120 redis-cache:6379; + wait-for-it -t 120 redis-queue:6379; + wait-for-it -t 120 redis-socketio:6379; + export start=`date +%s`; + until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \ + [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \ + [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]]; + do + echo "Waiting for sites/common_site_config.json to be created"; + sleep 5; + if (( `date +%s`-start > 120 )); then + echo "could not find sites/common_site_config.json with required keys"; + exit 1 + fi + done; + echo "sites/common_site_config.json found"; + bench new-site frontend --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default; + + db: + image: mariadb:10.6 + healthcheck: + test: mysqladmin ping -h localhost --password=admin + interval: 1s + retries: 15 + deploy: + restart_policy: + condition: on-failure + 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: admin + volumes: + - ./data/db-data:/var/lib/mysql + + + frontend: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + command: + - nginx-entrypoint.sh + environment: + BACKEND: backend:8000 + FRAPPE_SITE_NAME_HEADER: frontend + SOCKETIO: websocket:9000 + UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1 + UPSTREAM_REAL_IP_HEADER: X-Forwarded-For + UPSTREAM_REAL_IP_RECURSIVE: "off" + PROXY_READ_TIMEOUT: 120 + CLIENT_MAX_BODY_SIZE: 50m + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + ports: + - ${PANEL_APP_PORT_HTTP}:8080 + + + queue-default: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + command: + - bench + - worker + - --queue + - default + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + + queue-long: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + command: + - bench + - worker + - --queue + - long + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + + queue-short: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + command: + - bench + - worker + - --queue + - short + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + + redis-queue: + image: redis:6.2-alpine + deploy: + restart_policy: + condition: on-failure + volumes: + - ./data/redis-queue-data:/data + + + redis-cache: + image: redis:6.2-alpine + deploy: + restart_policy: + condition: on-failure + volumes: + - ./data/redis-cache-data:/data + + + redis-socketio: + image: redis:6.2-alpine + deploy: + restart_policy: + condition: on-failure + volumes: + - ./data/redis-socketio-data:/data + + + scheduler: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + command: + - bench + - schedule + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + + websocket: + image: frappe/erpnext:v14.28.0 + deploy: + restart_policy: + condition: on-failure + command: + - node + - /home/frappe/frappe-bench/apps/frappe/socketio.js + volumes: + - ./data/sites:/home/frappe/frappe-bench/sites + - ./data/logs:/home/frappe/frappe-bench/logs + + +volumes: + db-data: + redis-queue-data: + redis-cache-data: + redis-socketio-data: + sites: + logs: diff --git a/apps/erpnext/README.md b/apps/erpnext/README.md new file mode 100644 index 00000000..36e724f6 --- /dev/null +++ b/apps/erpnext/README.md @@ -0,0 +1,21 @@ +ERPNext as a monolith includes the following areas for managing businesses: + +Accounting +Warehouse Management +CRM +Sales +Purchase +HRMS +Project Management +Support +Asset Management +Quality Management +Manufacturing +Website Management +Customize ERPNext +And More +ERPNext is built on the Frappe Framework, a full-stack web app framework built with Python & JavaScript. + + +--- +Wait for 5 minutes for ERPNext site to be created or check container logs before opening browser on port 8080. (username: , password: create-siteAdministratoradmin) \ No newline at end of file diff --git a/apps/erpnext/data.yml b/apps/erpnext/data.yml new file mode 100644 index 00000000..0c0c3813 --- /dev/null +++ b/apps/erpnext/data.yml @@ -0,0 +1,20 @@ +name: erpnext +tags: + - 全球最敏捷的ERP +title: 全球最敏捷的ERP,ERPNext是世界上最好的免费开源ERP +type: 工具 +description: The most agile ERP on the planet +additionalProperties: + key: erpnext + name: erpnext + tags: + - Tool + shortDescZh: 全球最敏捷的ERP + shortDescEn: The most agile ERP on the planet + type: tool + crossVersionUpdate: false + limit: 1 + recommend: 4 + website: https://erpnext.com/ + github: https://github.com/frappe/erpnext + document: https://docs.erpnext.com/ diff --git a/apps/erpnext/logo.png b/apps/erpnext/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d6bceabebabe49a05e60c8d8c3d12464ecac7848 GIT binary patch literal 745 zcmVeh4bY)!^&fNe20)9zEK~#90?cK3U z8(|#A@#kKoLxe6NhYnc-8B)?&xZ;w@@fob(zPmvO>9?biBH}jvm_m3V*Wg^8QC>BAn2#Q5e zEP`SY6pNr(1jQmK7D2HHGZxkezgk!XYX|s#5$_V(Sp>x*C>BAn2#Q5eEP`SYY&>U0 z{yfBZ@sA&3y!e2PSl*6>MQqS*NKh<-Vi6RJpjZUOA}AI?u?UJqP%MIC5#GWF7Qe2r z^fTTiBHCF5#UdycL9qymMNlk)Vi6RJVDHnNf4RBC{I2UEUPn8NpjZUOA}AI?u?UJq zP%MIC5fqD{SOmo)xPNarH;d!tDO~618k;eHsgCa1je%P@&t9pjZUOA}AI? zu?UJqP%MIt=d8tj3yYw87yA-6VjW*wSi}b1h6KeTC>BAn2#Q5eEP`SY6pNr(1jQmK z7D2HH#?QDOAtn3_Ofl{ zi5Dd@07^O3D~_j0vU;U|99{o8YrTxEz~w-RwG|8xqSKLmFBv(qPlrK{H~BEg0Ua|s b_L$MX>kNdT