A docker image to assist with running Django projects in local development environments.
To run devrun, docker must be installed on the local system, and the current user must be in the
To run a standard project in the default way, simply run:
To see all available commands in devrun:
$ ./run --help
Adding devrun to a project
To add devrun to a project, simply copy the
run script and make it executable:
wget -O - https://raw.githubusercontent.com/ubuntudesign/docker-devrun/master/examples/run > run chmod +x run
If the project is a git project it's probably a good idea to also add the one locally generated file,
.compose-project-name, to your
echo ".compose-project-name" >> .gitignore
If you a CSS compilation step, you should have a
package.json in your project which defines a
watch-css script. If you have no other requirements from
package.json you can copy our example:
wget -O - https://raw.githubusercontent.com/ubuntudesign/docker-devrun/master/examples/package.json > package.json
Now to compile CSS when the server is run, either run the server with the
./run server --watch-css
Or to watch CSS every time the server is run, add
WATCH_CSS=true to the
All configuration happens in the
.env, where you should define 2 variables:
PORT: The local port on which to serve the webapp
DB: A boolean (
false) indicating whether the project needs a database
.env file exists, devrun will use port 8000 and assume no database, the equivalent of creating the following
The content of this project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license, and the underlying code used to format and display that content is licensed under the LGPLv3 by Canonical Ltd.
@nottrobin is this project's champion.
With ♥ from Canonical.