Running the development environment
The development environment runs on the local host. It allows to run/test/debug web2py applications.
Install
-
Install the common tools for example in
~/mywap/w2pext
> cd ~/mywap/w2pext > git clone https://gitlab.in2p3.fr/w2pext/utilities
-
Create the script
dev
for example in~/bin
#!/usr/bin/bash ~/mywap/w2pext/utilities/dev.py $*
-
Make the script
dev
executable:> cd ~/bin > chmod +x dev
-
Build the docker images
w2pext-degs:x.y.z
with web2py and third party libraries. The docker daemon has to run and you need privileges to run docker commands).> cd ~/mywap/w2pext > git clone https://gitlab.in2p3.fr/w2pext/docker > cd docker > ./build.py
Run
-
The code of your application is in
~/mywap/myapp
-
Create the configuration file
~/mywap/docker/dev.json
for thedev
container:{ "/home/me/mywap/myapp": [ "/opt/web2py/applications/myapp" ] }
-
Run the
dev
container> dev
-
The URL to access to your application is
http://localhost:8000/myapp
-
Try, for more information:
> dev -h