问题
Just wondering can I deploy OpenERP(Odoo) on Heroku and use postgres as its dbms? Have any body done this before.
Looking forward to response.
回答1:
Well, actually no, but may be.
Here is why:
- openerp requires access to filesystem, and heroku (as far as I know) doesn't provide storage
- Postgresql provided as addon to heroku application doesn't provide you with ability to create databases (and openerp creates one database for each company instance)
But I think that you can install it on heroku by collecting requirements via requirements.txt and providing it.
Then you'll have to do something with file storage, I think it's possible to add feature to openerp (as it's open source) for storing files at remote server (cloud storage etc.).
And last you'll have to provide postgresql server with permissions to create databases (I think there are cloud solutions).
PS. openerp is not intended to be installed on cloud platforms, the easiest way of deployment is on some sort of server (e.g. vps) where you can control filesystem and database server.
Hope it helps somehow.
回答2:
2 years late, but right now it is possible. Shameless plug:
https://github.com/adaptivdesign/odooku
Like sepulchered said the file storage is one of the first problems.
This can be solved by using S3 as a fallback in combination with a big /tmp cache in Heroku.
Second problem: db permissions, right now I've patched Odoo to work with a single database. You can also use AWS rdbs with Heroku, which completely solves the single db problem.
Third problem: Long polling running on secondary port. However Odoo can be run in "gevent mode", also currently being patched for best compatibility with Heroku's timeouts.
Fourth problem: Heroku's python buildpack is insufficient for compiling Odoo's dependencies. Was easily fixed with a custom buildpack.
Hope this helps anyone in the future.
来源:https://stackoverflow.com/questions/25424018/can-i-deploy-openerp-on-heroku