Generator scripts for creating and maintaining Canonical webteam projects
Clone or download
WillMoggridge Merge pull request #75 from WillMoggridge/dev-image
Update image to v1.6.1 - Allow  mounting .ssh folder
Latest commit 453dd4e Jun 25, 2018

The webteam's Yeoman generator

This is a collection of generator scripts for creating and maintaining Canonical webteam projects.


First, install Yeoman and generator-canonical-webteam using npm.

npm install -g yo generator-canonical-webteam

Then run the generator scripts from within a project directory to create or upgrade parts of the project:

cd {project-directory}
yo canonical-webteam:{script-name}


Each of these scripts can either be used to create new files or to update existing ones:


yo canonical-webteam:run

This installs a ./run script which will use docker-yarn to automatically manage NPM dependencies and run standard NPM scripts defined in a package.json.

$ ./run --help


  $ ./run \
    [-m|--node-module PATH]  # A path to a local node module to use instead of the installed dependencies \
    [COMMAND]                # Optionally provide a command to run

If no COMMAND is provided, `serve` will be run.


- serve [-p|--port PORT] [-w|--watch] [-d|--detach]: Run `yarn run serve` (optionally running `watch` in the background) \
- watch: Run `yarn run watch`
- build: Run `yarn run build`
- test: Run `yarn run test`
- stop: Stop any running containers
- yarn <args>: Run yarn
- clean: Remove all images and containers, any installed dependencies and the .docker-project file
- clean-cache: Empty cache files, which are saved between projects (eg, yarn)


yo canonical-webteam:run-django

Install a version of the run script which will also use docker-django to run a Django application on ./run start.


yo canonical-webteam:run-django-db

Install a version of the run script similar to the run-django one, but which will also run a postgres container and attach it to the Django container with the hostname db, for use by the application.


This codebase is licensed with GNU Lesser General Public License version 3.