Running web2py in a container / Kubernetes

102 views
Skip to first unread message

backseat

unread,
Jul 11, 2019, 12:27:21 PM7/11/19
to web2py-users
We're looking to move a web2py app to run in a container under Kubernetes.

I'm interested in experiences of running web2py in a non-persistent container. In particular, how have people handled the app/databases directory?

Thanks

Leonel Câmara

unread,
Jul 11, 2019, 3:15:42 PM7/11/19
to web2py-users
I would probably just use InDBMigrator and ditch the databases directory.

Stéphane Krikorian

unread,
Jul 11, 2019, 6:02:31 PM7/11/19
to web...@googlegroups.com
hi
i run both stateless w2p apps and statefull ones on kubernetes.
note that when using web2py framework with authentication you often end up with a database unless working in a read only mode. 
in my architecture : for statefull apps:  database backend (postgres) is externalized for production (it runs on  VM cluster) 
note that in this case I have to delete the app/database dir content to avoid side effects at the first connection where the database structure is discovered and synchronized with this  directory.
This is done via a script when the container starts app for the first time.
For stateless I simply don't care about database directory.
Stephane



--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/88be3802-aa08-423e-897f-d1778f0bc139%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages