[FEATURE]申请应用商店添加ERPNEXT应用 #7096
woodchen-ink
started this conversation in
Ideas
Replies: 2 comments
-
感谢反馈。初步了解了该项目的容器化部署方式,涉及了太多的容器,后续在 1Panel 应用商店的维护上会存在相当大的难度。 https://hub.docker.com/r/elestio/erpnext version: "3.3"
services:
backend:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
restart: always
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
configurator:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
command:
- configure.py
environment:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
REDIS_CACHE: ${REDIS_CACHE}
REDIS_QUEUE: ${REDIS_QUEUE}
REDIS_SOCKETIO: ${REDIS_SOCKETIO}
SOCKETIO_PORT: ${SOCKETIO_PORT}
volumes:
- sites:/home/frappe/frappe-bench/sites
create-site:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
deploy:
restart_policy:
condition: on-failure
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
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 ^ common_site_config.json | jq -r ".db_host // empty"` ]] && \
[[ -n `grep -hs ^ common_site_config.json | jq -r ".redis_cache // empty"` ]] && \
[[ -n `grep -hs ^ common_site_config.json | jq -r ".redis_queue // empty"` ]];
do
echo "Waiting for common_site_config.json to be created";
sleep 5;
if (( `date +%s`-start > 120 )); then
echo "could not find common_site_config.json with required keys";
exit 1
fi
done;
echo "common_site_config.json found";
bench new-site frontend --admin-password=${ADMIN_PASSWORD} --db-root-password=admin --install-app payments --install-app erpnext --set-default;
db:
image: mariadb:10.6
restart: always
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: ${MYSQL_ROOT_PASSWORD}
volumes:
- db-data:/var/lib/mysql
frontend:
image: frappe/erpnext-nginx:${SOFTWARE_VERSION_TAG}
restart: always
depends_on:
backend:
condition: service_started
websocket:
condition: service_started
environment:
BACKEND: ${BACKEND}
FRAPPE_SITE_NAME_HEADER: ${FRAPPE_SITE_NAME_HEADER}
SOCKETIO: ${SOCKETIO}
UPSTREAM_REAL_IP_ADDRESS: ${UPSTREAM_REAL_IP_ADDRESS}
UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER}
UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE}
volumes:
- sites:/usr/share/nginx/html/sites
- assets:/usr/share/nginx/html/assets
ports:
- "172.17.0.1:8989:8080"
queue-default:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
restart: always
command:
- bench
- worker
- --queue
- default
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
queue-long:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
restart: always
command:
- bench
- worker
- --queue
- long
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
queue-short:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
restart: always
command:
- bench
- worker
- --queue
- short
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
redis-queue:
image: redis:6.2-alpine
restart: alwayse
volumes:
- redis-queue-data:/data
redis-cache:
image: redis:6.2-alpine
restart: always
volumes:
- redis-cache-data:/data
redis-socketio:
image: redis:6.2-alpine
restart: always
volumes:
- redis-socketio-data:/data
scheduler:
image: frappe/erpnext-worker:${SOFTWARE_VERSION_TAG}
restart: always
command:
- bench
- schedule
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
websocket:
image: frappe/frappe-socketio:${SOFTWARE_VERSION_TAG}
restart: always
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets
volumes:
assets:
driver: local
driver_opts:
type: none
device: ${PWD}/assets
o: bind
db-data:
driver: local
driver_opts:
type: none
device: ${PWD}/db-data
o: bind
redis-queue-data:
driver: local
driver_opts:
type: none
device: ${PWD}/redis-queue-data
o: bind
redis-cache-data:
driver: local
driver_opts:
type: none
device: ${PWD}/redis-cache-data
o: bind
redis-socketio-data:
driver: local
driver_opts:
type: none
device: ${PWD}/redis-socketio-data
o: bind
sites:
driver: local
driver_opts:
type: none
device: ${PWD}/sites
o: bind |
Beta Was this translation helpful? Give feedback.
0 replies
-
好的, 谢谢. 我就是因为compose太长, 所以想懒人直接应用商店安装哈哈, 的确维护有点麻烦. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1Panel 版本
最新版
请描述您的需求或者改进建议
https://github.com/frappe/erpnext
申请添加这个应用, 21.9K star, 官方原生支持docker
请描述你建议的实现方案
No response
附加信息
No response
Beta Was this translation helpful? Give feedback.
All reactions