# Frappe Develop Guide ## Requirements - python3 - nodejs - yarn - docker ## Venv setup ```bash= python3 -m venv venv . venv/bin/activate ``` ## Install bench ```bash= git clone https://github.com/frappe/bench .bench pip install -e .bench ``` ## Init frappe ```bash= #缺什麼裝什麼 bench init --skip-redis-config-generation frappe-bench #skip redis configuration ``` ## Environment setup - mariadb ```bash docker run -d -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=frappe \ -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=frappe \ mariadb:10.3 \ --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci ``` - redis ```bash docker run -d redis # for redis_queue docker run -d redis # for redis_cache docker run -d redis # for redis_socketio ``` - 設定Procfile 修改 frappe-bench/Procfile,刪除以下三行 ``` redis_cache: redis-server config/redis_cache.conf redis_socketio: redis-server config/redis_socketio.conf redis_queue: redis-server config/redis_queue.conf ``` - 設定redis連線資訊 修改 frappe-bench/sites/common_site_config.json ``` redis_cache: ... redis_queue: ... redis_socketio: ... ``` ## Create site ```bash cd frappe-bench # site domain 填入連線時IP或domain bench new-site --db-name frappe --db-host ${db_host} --db-port ${db_port} ${site_domain} ``` 建立過程中會失敗,但會建立sites/${site_domain}資料夾 - 設定 database 連線資訊 調整sites/${site_domain}/site_config.json設定檔 ``` { "db_host": "", "db_name": "frappe", "db_password": "password", "db_port": port_number, "db_type": "mariadb", "developer_mode": 1 } ``` - 設定 database ```bash # 這個步驟會刪除原本的資料 bench --site ${site_domain} reinstall # 照著指示填資料 ``` ## Install erpnext - 下載 erpnext app ```bash # 目錄: frappe-bench bench get-app erpnext ``` - 安裝 erpnext app ```bash bench --site ${site_domain} install-app erpnext ``` ## Start erpnext ```bash bench start ``` 瀏覽器連線,登入 Administrator 設定 erpnext
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up