diff --git a/ct/erpnext.sh b/ct/erpnext.sh index a20a7392..6ee8a4e8 100644 --- a/ct/erpnext.sh +++ b/ct/erpnext.sh @@ -31,8 +31,7 @@ function update_script() { fi msg_info "Updating ERPNext" - cd /opt/frappe-bench - $STD bench update --reset + $STD sudo -u frappe bash -c 'export PATH="$HOME/.local/bin:$PATH"; cd /opt/frappe-bench && bench update --reset' msg_ok "Updated ERPNext" exit } @@ -44,7 +43,7 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" echo -e "${INFO}${YW} Credentials:${CL}" echo -e "${TAB}${BGN}Username: Administrator${CL}" echo -e "${TAB}${BGN}Password: see /opt/frappe-bench/.env${CL}" diff --git a/install/erpnext-install.sh b/install/erpnext-install.sh index ab1d05c7..8daf76c0 100644 --- a/install/erpnext-install.sh +++ b/install/erpnext-install.sh @@ -22,6 +22,8 @@ $STD apt install -y \ libffi-dev \ libssl-dev \ redis-server \ + nginx \ + supervisor \ xvfb \ libfontconfig1 \ libxrender1 \ @@ -79,29 +81,10 @@ $STD systemctl enable --now redis-server msg_ok "Configured ERPNext" msg_info "Setting up Production" -$STD sudo -u frappe bash -c 'export PATH="$HOME/.local/bin:$PATH"; cd /opt/frappe-bench && bench setup production frappe --yes' +$STD bash -c 'export PATH="/home/frappe/.local/bin:$PATH"; cd /opt/frappe-bench && bench setup production frappe --yes' +$STD systemctl enable --now supervisor msg_ok "Set up Production" -msg_info "Creating Service" -cat </etc/systemd/system/erpnext.service -[Unit] -Description=ERPNext (Frappe Bench) -After=network.target mariadb.service redis-server.service - -[Service] -Type=simple -User=frappe -WorkingDirectory=/opt/frappe-bench -ExecStart=/opt/frappe-bench/env/bin/gunicorn --bind 0.0.0.0:8000 --workers 4 --timeout 120 frappe.app:application -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now erpnext -msg_ok "Created Service" - motd_ssh customize cleanup_lxc diff --git a/json/erpnext.json b/json/erpnext.json index dd3cdbee..0f8768da 100644 --- a/json/erpnext.json +++ b/json/erpnext.json @@ -8,7 +8,7 @@ "type": "ct", "updateable": true, "privileged": false, - "interface_port": 8000, + "interface_port": 80, "documentation": "https://docs.erpnext.com/", "website": "https://erpnext.com/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/erpnext.webp",