Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Open Source RAD Dev Container Release for PY4WEB/WEB2PY and native Caprover Integration

38 views
Skip to first unread message

Kevin Keller

unread,
Oct 1, 2024, 4:24:49 AM10/1/24
to py4web, web2py-users, John Bannister
  Hey everyone

Open Source Release 

We have released the Python  runtime that powers our SaaS Cloud Development Platform :


as OPEN SOURCE and self-hostable Docker runtimes. 

Where to Find the Code: 

With the Docker image you can easily spin up different Python frameworks, get SSH access to the container (or build SSH tunnels from the container).
It also spins up an embedded OpenVSCode instance to get coding quickly. 

Here is the repo to build your own Docker image:

We publish pre-build images here:



 Feedback & Testimonials


Please give it a try and let us know your feedback. 

We are currently looking for testimonials and feedback as we are seeking pre-seed funding for our Cloud Dev Startup at the same time we want to also give back to the open source and PY4WEB / WEB2PY community. 

Your feedback would mean a lot to us, so that we can do this full time, enhancing our open source offerings and SaaS offering to make PY4WEB and WEB2PY development as productive as possible. 

Btw our SaaS offering for Python and PY4WEB and WEB2PY has a new trial period of 3 months now, an AI code assistant and secure code sharing.

So if you dont want to self host, let us do it for you and get some additional productivity extras.

We also very much would be interested in feedback on the SaaS offering as well. 


Caprover Integration

We also offer Caprover One-Click-App integration for your self hosted Caprover instance: 

Just add this to your Caprover One-Click integration for 3rd party providers:




image.png
  

And then you will see that PY4WEB and WEB2PY are available as One-Click-Apps:

image.png

Alternatively copy/paste the contents of the attached py4web_caprover.yml or web2py_caprover.yml into the "TEMPLATE" One Click App. 

This installs either PY4WEB or WEB2PY and spins up a Reverse Proxy instance too, that will give you access to the OpenVSCode instance. 

Don't forget to enable HTTPs AND WEBSOCKETS für OpenVSCode to work. 

Also the admin interface in WEB2PY can not be authenticated into, if you dont have HTTPS enabled and you dont come from localhost. 

image.png




How to run containers locally: Docker Compose

For easy running and testing of the container locally you find the docker-compose.yml files in the Github repo. 

So git clone the repo, cd into it, rename either the docker-compose.yml.py4web or docker-compose.yml.web2py to "docker-compose.yml" and then run "docker compose up". 

You have to have Docker and Docker compose installed of course. 

You will find the PY4WEB or WEB2PY running on http://localhost:8000 and OpenVSCode running on http://localhost:3000 then.  SSH Port is set to 2022. You will see  the PrivatKey in the container log. 
User is "websson". 



Whats included:

The image installs Python 3.12 via MiniForge, which basically gives you a full Conda environment with Code-Forge access.

This means you can also install different Python versions in the same container in super easy and with Conda-Forge access many packages that usually need to be compiled are able to download binaries from Conda-Forge, if you like

You can also install using regular PyPi, plus the Pixi package manager is also available. 

When using PyPi and PIP Astrals UV is available to install packages that speeds up package installs 100x, but you can also use regular pip as well. 

Supervisor and Valkey (Redis alternative) are embedded for quick Celery task dev and testing.

NodeJS LTS is also pre-installed in case you want to also develop JS/TS things, transpile things via Javascript or simply host a Vue,React or Angular frontend in the same container as your Web2Py or Py4Web instance and use it as a backend. 

All of those things are pre-installed or modifiable by you and all changes are stored the your home directory.  

It's a container, but it basically feels like  developing on a regular Linux VM. 

You can also install additional software and programming languages into your home directory (which is persisted as docker volume) using https://asdf-vm.com/ which is embedded in the container as package manager. 

You can e.g.  install NodeJS latest or Rust or PHP etc. etc. that way if needed  via ASDF.

Additional stuff:

There is also an NGINX server embedded you could use to offload static files to. 

Additionally a web terminal can be started and JupyterLab is also easy to install which can all live happily next to VSCode. 

Any questions, how to work with this or feedback, please let us know. 

Kevin & John





py4web_caprover.yaml
web2py_caprover.yaml
Reply all
Reply to author
Forward
0 new messages