I have successfully installed ERPNext in a FreeBSD jali, tricking it into believing that my remote MySQL/MariaSB server (running in a different jail) is actually serving a locally available socket, and managed to use a remote Redis instance.
I have also configured an include on my existing reverse Nginx proxy (running in a different jail) to server dynamic contents via the application server (frappe and friends), and statric contents directly, including the related erpnext/public, frappe/public and shopping_cart/public folder contents using appriate /etc/fstab entries and nullfs mounting.
I DID run the git clone and installation script as root, because I DO want to see application code have root:wheel permissions, run the application as frappe_instance user and loosen up the permissions on specific folders accordingly. Here is the code to do so:
The above configuration works great with:
chown -R frappe_caocuero:wheel /usr/local/frappe_instance/logs
chown -R frappe_instance:www /usr/local/frappe_instance/sites
chmod -R 640 /usr/local/frappe_instance/logs /usr/local/frappe_instance/sites
chmod -R 440 /usr/local/frappe_instance/sites/*.txt /usr/local/frappe_instance/sites/assets
chmod -R ug+X /usr/local/frappe_instance/logs /usr/local/frappe_instance/sites
ln -fs /usr/local/frappe_instance/logs /var/log/frappe_instance
chmod 750 /usr/local/frappe_instance/sites
chmod 400 /usr/local/frappe_instance/sites/common_site_config.json /usr/local/frappe_instance/sites/${SITE_ID}/site_config.jsonIt works equally well with the stanza recommended after each successful run of the installation script:
su - frappe_instance
cd /usr/local/frappe_instance
./env/bin/honcho start
However, the above modes to get ERPNext running are for development, not production mode.
su - frappe_instance
cd /usr/local/frappe_instance
/usr/local/frappe_instance/env/bin/frappe --serve my_site --port 8080 --sites_path /usr/local/frappe_instance/sites
Although I use gunicorn extensively for my existing Django applications (using Dan Bernstein's daemontools), I seem to be out of luck with the configuration file that is provided after successful setup by the ERPNext installation script:
[program:frappe-web]
environment=SITES_PATH='/usr/local/frappe_instance/sites'
command=/usr/local/frappe_instance/env/bin/gunicorn -b 127.0.1.113:8080 -w 2 -t 120 frappe.app:application
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/usr/local/frappe_instance/logs/web.log
stderr_logfile=/usr/local/frappe_instance/logs/web.error.log
user=frappe_instance
[program:frappe-worker]
command=/usr/local/frappe_instance/env/bin/python -m frappe.celery_app worker
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/usr/local/frappe_instance/logs/worker.log
stderr_logfile=/usr/local/frappe_instance/logs/worker.error.log
user=frappe_instance
directory=/usr/local/frappe_instance/sites
[program:frappe-workerbeat]
command=/usr/local/frappe_instance/env/bin/python -m frappe.celery_app beat -s test.schedule
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/usr/local/frappe_instance/logs/workerbeat.log
stderr_logfile=/usr/local/frappe_instance/logs//workerbeat.error.log
user=frappe_instance
directory=/usr/local/frappe_instance/sites
[group:frappe]
programs=frappe-web,frappe-worker,frappe-workerbeat
Do you have any hints on where to look, and what to do?
Thanks a lot, indeed!
Chris
–
Note:
If you are posting an issue,
- We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
- Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
- For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/df31c9c8-d833-4e93-8e57-a82c3d79b3d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.