There are 2 options to run Cookiecutter:
- install it on your machine
- run it with Docker
While you think of it, navigate to the directory in which you want to create your site factory:
If you chose to install Cookiecutter, you can now run it against our template as follows:
cookiecutter gh:openfun/richie --directory cookiecutter
If you didn't want to install it on your machine, we provide a Docker image built with our own repository that you can use as follows:
docker run --rm -it -u $(id -u):$(id -g) -v $PWD:/app \
fundocker/cookiecutter gh:openfun/richie --directory cookiecutter
--directory option is to indicate that our Cookiecutter template is in
cookiecutter directory inside our git repository and not at the root.
You will be prompted to enter an organization name, which will determine the
name of your repository. For example, if you choose "foo" as organization
name, your repository will be named
nice if you keep it that way so all richie site factories follow this
When you confirm the organization name, Cookiecutter will generate your project from the Cookiecutter template and place it at the level where you currently are.
Bootstrap your project
Enter the newly created project and add a new site to your site factory:
This script also uses Cookiecutter against our site template.
Once your new site is created, activate it:
Now bootstrap the site to build its docker image, create its media folder, database, etc.:
Once the bootstrap phase is finished, you should be able to view the site at localhost:8070.
You can create a full fledge demo to test your site by running:
Note that the README of your newly created site factory contains detailed information about how to configure and run a site.
Once you're happy with your site, don't forget to backup your work e.g. by committing it and pushing it to a new git repository.
Probably you want to change the default theme. The cookiecutter adds an extra scss frontend folder with a couple of templates where you can use to change the default styling of the site.
To change the default logo of the site, you need to create the folder
sites/<site>/src/backend/base/static/richie/images and then override the new
Update your Richie site factory
If we later improve our scripts, you will be able to update your own site
factory by replaying Cookiecutter. This will override your files in the
project's scaffolding but, don't worry, it will respect all the sites you
will have created in the
cookiecutter --overwrite-if-exists gh:openfun/richie --directory=cookiecutter
Help us improve this project
After starting your project, please submit an issue let us know how it went and what other features we should add to make it better.