Yes, the book is on github (https://github.com/mdipierro/web2py-book)


On Thursday, 29 November 2012 10:56:37 UTC-6, Dirk Krause wrote:
>
> Sure. I could take what you wrote down there, test it on Heroku, verify 
> that nothing was forgotten, beef it up a little bit and put it - where? A 
> pull request on Github? Is the documentation a git?
>
>
> Am Donnerstag, 29. November 2012 17:52:22 UTC+1 schrieb Massimo Di Pierro:
>>
>> Can you help with that documentation?
>>
>> On Thursday, 29 November 2012 10:35:44 UTC-6, Dirk Krause wrote:
>>>
>>> From my attempts to get apps running on Heroku (a few experiments with 
>>> nodejs) people expect to create and edit the requirements and the procfile 
>>> anyways. The procedure is also described in Herokus 
>>> Tutorials<https://devcenter.heroku.com/articles/python>, 
>>> so one needs to understand the concept anyways. No need to ship that would 
>>> be my 2 cents, rather document it (like you already did here).
>>>
>>> Am Donnerstag, 29. November 2012 16:41:45 UTC+1 schrieb Massimo Di 
>>> Pierro:
>>>>
>>>> FYI (from web2py-developers)
>>>>
>>>>
>>>> Hello everybody,
>>>>
>>>> At PyCon Argentina I met Craig Kerstiens from Heroku. He explained to 
>>>> me how heroku works and we were able to make web2py work on heroku.
>>>>
>>>> This is still experimental and I will continue tweak it but you may 
>>>> want to give it a try and share your suggestions for improvement:
>>>>
>>>>
>>>> HOWTO:
>>>>
>>>> 1) get a heroku account and SDK (it is all free)
>>>>
>>>> 2) download web2py from google code (not from github because you do not 
>>>> want the .git folder)
>>>>
>>>>    hg clone https://massimo.dipie...@code.google.com/p/web2py/
>>>>
>>>>    cd web2py
>>>>
>>>> 3) install your web2py apps
>>>>
>>>> 4) in each app, replace
>>>>
>>>>    db=DAL(…)
>>>>
>>>> with
>>>>
>>>>    from gluon.contrib.heroku import get_db 
>>>>                                         
>>>>
>>>>    db = get_db() 
>>>>
>>>> 5) from inside the web2py folder do (this create a git repo, if you 
>>>> have one, delete it):
>>>>
>>>>    scripts/setup-web2py-heroku.sh
>>>>
>>>> Now should have your apps running on heroku with postgresql.
>>>>
>>>> caveats:
>>>>
>>>> get_db()  gives you a postgresql connection on heroku and stores 
>>>> sessions, migrations , and uploads in postgres (one db for all apps). When 
>>>> running locally uses a heroku.test.sqlite database (one for each app). I 
>>>> will post instructions so that each app gets its own database. Tickets 
>>>> still go in file system and will be accessible via admin interface but 
>>>> every 24hrs the file system is wiped out and tickets are lost.
>>>>
>>>> Admin is not in readonly mode but any change you do via admin will be 
>>>> lost when the system is reset (every 24 hrs). So you should assume it is 
>>>> readonly.
>>>>
>>>> Appadmin works fine.
>>>>
>>>> Is the DAL(…) -> get_db() replacement too much to ask to the users? We 
>>>> could do it automatically under the hood once we detect heroku. What do 
>>>> you 
>>>> think? Using get_db gives more flexibility for tweaking, specifically when 
>>>> multiple databases are present.
>>>>
>>>> There are two files that need to be created (done by 
>>>> setup-web2py-heroku.sh): requirements.txt and Procfile. We could ship them 
>>>> with web2py but people need to be able to configure them anyway. Should we 
>>>> ship them or let users create them?
>>>>
>>>> This should be even easier. People should be able to simply git commit 
>>>> apps (with get_db) and pip install web2py. I do not know how to do it 
>>>> because I do not understand distutil and git well enough yet. Perhaps 
>>>> people should be able to git pull apps directly from the admin running on 
>>>> heroku.
>>>>
>>>>
>>>> Massimo
>>>>
>>>

-- 



Reply via email to