Not sure if this is the only problem, but in run.sh, the call to web2py.py 
in the "else" block does not specify an ip address, so it will default to 
127.0.0.1, which will run the server on localhost only. You should instead 
specify "-i 0.0.0.0".

Anthony

On Wednesday, July 4, 2018 at 12:03:31 PM UTC-4, Serge Bourgeois wrote:
>
> July 4, 2018
> Hello,
>
> At first, thanks to all of you for the web2py and all the the dynamic that 
> you generate around this project!
>
> Here is one link to store a recipe could be here for deploying web2py on 
> IBM Cloud (new name of Bluemix):
>
> https://developer.ibm.com/recipes/tutorials/category/web-development/
>
> I was hoping to bring my modest contribution, but I didn't succeed. 
> I 'pushed' the web2py framework alone (hoping to be able to enter the 
> welcome/default/index function) to my environment.
>
> The content of what I have pushed in my IBM Cloud instance is on google 
> drive here: 
> https://drive.google.com/open?id=1L2gRyL3LSCZHB8fvIQ8eueDzpTOcAMgZ)
>
> Everything looked nice until I tried to connect to the IBM Cloud server's 
> 'endpoint' is at https://tripkit.eu-gb.mybluemix.net .
>
> I got the following error message: '502 BAD Gateway: Registered endpoint 
> failed to handle the request.'
>
> Same error message also with 
> https://tripkit.eu-gb.mybluemix.net/welcome/default/index
>
> As I'm not an IT expert, I don't think I'll be able to solve this alone.
>
>
> This push seems to work well, but in practice, nothing works... 
>  
> I think you in advance for any idea / suggestion to help deploying a 
> web2py on the IBM Cloud. 
>
> Should you wish more info about my attempts, simply ask me (phone + 32 477 
> 33 10 11, mail: serge.bourge...@yahoo.fr).
>
> Le jeudi 8 mai 2014 14:25:49 UTC+2, Massimo Di Pierro a écrit :
>>
>> Thank you Duncan,
>>
>> this is very valuable. There should be a setup script for this shipping 
>> with web2py. Is there any IBM blog wjere we could advertise it?
>>
>> Massimo
>>
>> On Tuesday, 6 May 2014 19:29:48 UTC-5, duncan macneil wrote:
>>>
>>> Hi all,
>>>
>>> I've been trying out the www.bluemix.net IBM PaaS. 
>>>
>>> It took me a bit of digging to realise there is in fact a Python 
>>> runtime. But you need a buildpack. The setup is different enough from 
>>> Heroku to warrant this mini-HowTo:
>>>
>>> Step 1:
>>>
>>> Use the source version of Web2Py and copy the entire lot into a folder 
>>> path: 'env/app' so that web2py.py is in the 'app' folder.
>>>
>>> Step 2:
>>>
>>> You need to have a requirements.txt file in the 'app' folder -- even if 
>>> it is empty. (Although you might want to add a single line with just 
>>> psycopg2, for example.)
>>>
>>> Step 3: 
>>>
>>> You need to have a manifest.yml in the 'en'v folder (top level of the 
>>> project) with something like the following content:
>>>
>>> applications:
>>> - host: mycoolapp
>>>   name: mycoolapp
>>>   command: python web2py.py -a 'yourpassword' -i 0.0.0.0 -p $PORT
>>>   path: app
>>>   domain: ng.bluemix.net
>>>   mem: 128M
>>>   buildpack: git://github.com/ephoning/heroku-buildpack-python.git
>>>   instances: 1
>>>
>>> You need to make sure that 'mycoolapp' is changed to be unique and 
>>> 'yourpassword' is changed, too, obviously.
>>>
>>> Step 4:
>>>
>>> Push this entire 'env' directory to BlueMix by navigating to the 'env' 
>>> directory and running:
>>>
>>> cf push
>>>
>>> This assumes you have installed the CloudFoundry CLI command line tool, 
>>> although it also works if you put all the same resources described above 
>>> into an empty/new linked JazzHub git project from BlueMix and simply press 
>>> 'Deploy' from the web page provided. Handy.
>>>
>>> Some points to consider:
>>>
>>> 1. The file structure will hold and run the default SQLite db 
>>> internally, but that's probably not what you want because the files are not 
>>> designed/guaranteed to be persistent (flushed with a new/fresh deploy, for 
>>> instance). Instead you can add PostgreSQL and use that for data persistence 
>>> -- BlueMix gives you a Postgres connection URL, ready to use! You just add 
>>> it as a service to the app.
>>>
>>> 2. If you change instances = 1 to a larger number, then you'll probably 
>>> also want to add a Redis service and use Redis for sessions (or a db for 
>>> sessions). This will most likely allow people to remain logged in when they 
>>> are load balanced via round robin to another instance, but I have not 
>>> tested that. (What I *did* test is that you don't stay logged in with 
>>> multiple instances running, which suggests for larger-scale apps with 
>>> multiple instances running you'l want a central Redis for sessions.)
>>>
>>> 3. You get a SSL-ready address at something like 
>>> https://mycoolapp.ng.bluemix.net (wildcard certificate exists for *.
>>> ng.bluemic.net), but since it seems to have some kind of reverse proxy, 
>>> Web2Py doesn't detect that the admin is being used under HTTPS: so you 
>>> might want to also store errors in the DB, too. The default with Web2Py is 
>>> errors in stored the file path. Or modify the app admin to ignore HTTPS 
>>> (just remember to use HTTPS when logging in!) 
>>>
>>> I hope this helps someone. BlueMix is free during Beta. Pricing to be 
>>> announced in June, I think. It will be interesting to see what the pricing 
>>> is.
>>>
>>> Overall I think the service is pretty good -- especially if you need 
>>> formal DevOps. IBM have made the DevOps thing quite neat in BlueMix. I 
>>> particularly like being able to 'click the Postgres hexagon' and get a DB 
>>> connection URL back without any install/setup issues.
>>>
>>> Regs,
>>> Duncan.
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to