This page records my personal “cheat sheet” for the p5-editor fork maintained by Andrew McNutt.
This link has useful information about running Docker under NixOS.
If this is the first time starting the container, it is necessary to copy .env.example to .env, and fill-in the required fields.
At a minimum, the required fields are:
GITLAB_URLGITLAB_IDhttp://localhost:8000/auth/gitlab/callback (server/routes/passport.routes.js)api scope must be granted.GITLAB_SECRETTo start the web server and the database:
$ docker compose -f docker-compose-development.yml up
When you're done, run the following to shut down the services:
$ docker compose -f docker-compose-development.yml down
The docker compose configuration defines a named volume, dbdata, which contains the database.
To drop this database, you can delete this persistent volume:
$ docker volume rm p5-editor_dbdata
There are some useful scripts which add course editions, assignments, etc. in /server/scripts.
For example, to add a new course edition, you could run:
$ ./server/scripts/add-course-edition.sh \ --name "test-edition" \ --password 1234 \ --project-name-template "sbcohen/p5-assignments-OWNER"
The –project-name-template flag tells the server how to construct project/repository names.
In the case of the above example, the gitlab repository URL was https://gitlab.taila5f9fc.ts.net/sbcohen/p5-assignments-sbcohen.
The string OWNER stands in for the gitlab username of the repository owner (it is replaced dynamically at runtime with the actual username).
Example:
$ ./server/scripts/add-assignment.sh \ --name "Test Assignment" \ --urlName "test-assignment" \ --dueDate 2026-11-30 \ --edition test-edition
–legacy-peer-deps (See /Dockerfile)