This document outlines how to set up your local development environment and our process for submitting changes.
- Contributing to the Makeability Lab Website
- Install Docker: Download and install Docker Desktop. Run
docker versionin your terminal to verify it is running. - Clone the Repository:
git clone https://github.com/jonfroehlich/makeabilitylabwebsite.git cd makeabilitylabwebsite - Build the Image:
Note: This may take 2-3 minutes.
docker build . -t makelab_image - Run the Container:
To run in detached mode (background), add the
docker-compose -f docker-compose-local-dev.yml up
-dflag:docker-compose -f docker-compose-local-dev.yml up -d. - Don't forget to create a local superuser to create content (see below).
If you dev on Windows, you should use WSL2 for better performance and Linux kernel compatibility.
-
Install WSL2
- Follow the WSL2 installation guide
-
Install Docker:
- Install Docker Desktop for Windows.
- Enable "Use the WSL 2 based engine" in Docker Settings > General.
- Under Resources > WSL Integration, enable integration for your Linux distro (e.g., Ubuntu).
-
Clone the Repository (Inside WSL): Open your Linux shell and run:
git clone https://github.com/makeabilitylab/makeabilitylabwebsite.git cd makeabilitylabwebsite -
Set Permissions: Run the following to ensure Docker can execute scripts and write to folders:
chmod 755 docker-entrypoint.sh chmod 777 media mkdir -p static && chmod -R 777 static/ mkdir -p website/migrations && chmod -R 777 website/
-
Build and Run:
docker build . -t makelab_image docker-compose -f docker-compose-local-dev.yml up -
(Optional) Map WSL filesystem to Windows
Press
Win + R, type\\wsl$, find your Linux distro folder, right-click → Map Network Drive. This lets you browse Linux files from Windows Explorer. -
Don't forget to create a local superuser to create content (see below).
After initial setup, start the development server with:
docker-compose -f docker-compose-local-dev.yml upOr use the convenience script:
./run-docker-local-dev.shThe site will be available at http://localhost:8571.
Note: You don't need to rebuild the image unless you modify
Dockerfileordocker-compose.yml. Code changes are reflected automatically.
Why launch from WSL matters: On Windows, your code lives inside the WSL2 Linux filesystem, but VSCode runs on Windows. If you open the project from Windows Explorer or via
\\wsl$, VSCode reads files across the Windows↔Linux boundary, which is slow and can silently break file watching (so live reload may not fire). The fix is to launch VSCode from inside WSL2 so its backend runs on the Linux side, right next to your code.
This repo ships a Dev Container config (.devcontainer/devcontainer.json), so VSCode can open the project inside the running website container with Python IntelliSense, Django syntax highlighting, and template formatting all preconfigured. This is the recommended workflow (Option 1 below). Option 2 is a lighter-weight alternative for quick edits when you don't need container-aware IntelliSense.
Install these two VSCode extensions (VSCode usually prompts you for the WSL one automatically the first time you run code . from WSL):
- WSL (
ms-vscode-remote.remote-wsl) — runs VSCode's backend inside your WSL2 distro. - Dev Containers (
ms-vscode-remote.remote-containers) — lets VSCode open/reopen the project inside the Docker container.
You do not need to install Python, Pylance, the Django extension, or djlint yourself—the Dev Container installs them automatically inside the container (see below).
This runs VSCode's backend inside the website container, so the integrated terminal, Python interpreter, debugger, and IntelliSense all use the container's exact environment and installed packages.
-
Open a WSL2 terminal and navigate to the repo where you cloned it inside WSL (somewhere under your Linux home like
~/, not under/mnt/c/...):cd makeabilitylabwebsite -
Launch VSCode from WSL:
code .Confirm the green badge in the bottom-left corner reads
WSL: Ubuntu(or your distro's name). If it doesn't, you've opened the Windows-side copy—close the window and re-runcode .from the WSL shell. -
Reopen in the container. VSCode detects
.devcontainer/devcontainer.jsonand pops a notification: "Reopen in Container." Click it. (Missed the popup? Open the Command Palette withCtrl+Shift+Pand run Dev Containers: Reopen in Container.) -
VSCode now starts the
websiteservice (and thedbit depends on) fromdocker-compose-local-dev.yml, opens/codeas the workspace, and on first creation automatically:- installs Pylance, the Django extension (
batisteo.vscode-django), and djlint inside the container; - sets djlint as the formatter for Django/HTML templates;
- runs
git config --global --add safe.directory /codeto prevent the Git "dubious ownership" error.
- installs Pylance, the Django extension (
-
The site comes up at http://localhost:8571 as usual. Edits reflect live (the project is mounted at
/code), and IntelliSense now resolves against the container's Python.
Tip: To switch back to plain host-side editing, run Dev Containers: Reopen Folder Locally from the Command Palette. To re-enter the container later, it's Dev Containers: Reopen in Container again.
Skip the container and edit directly on the WSL2 side. Faster to open, but VSCode uses your WSL2 host's Python, so IntelliSense won't see packages installed only inside the container.
-
From a WSL2 terminal in the repo, run
code .(confirm theWSL: Ubuntubadge as above) and dismiss the "Reopen in Container" prompt. -
Start the site from VSCode's integrated terminal:
docker-compose -f docker-compose-local-dev.yml up
-
Visit http://localhost:8571. Because the project is mounted into the container (
.:/code), your edits are reflected immediately—no rebuild required.
Tip: To get a plain shell inside the running container (e.g., to run
manage.pycommands) without using the Dev Container, use:docker exec -it makeabilitylabwebsite-website-1 bashDepending on your Docker Compose version the name may use underscores:
makeabilitylabwebsite_website_1. This is the same container referenced in Creating a Superuser.
To stop the containers:
docker-compose downImportant: Without this command, containers persist in the background even after closing your terminal, keeping port 8571 occupied.
A superuser account is required to access the Django admin interface and add content.
-
With containers running, open a new terminal
-
Access the website container:
docker exec -it makeabilitylabwebsite_website_1 bashNote: Depending on your Docker/Compose version, the container name may use a hyphen instead of underscore:
makeabilitylabwebsite-website-1 -
Create the superuser:
python manage.py createsuperuser
-
Follow the prompts to set username, email, and password
-
Exit the container:
exit
-
Navigate to the Django admin interface: http://localhost:8571/admin
-
Log in with your superuser credentials
-
Under the WEBSITE header, select the content type you want to add (Publications, People, Projects, etc.)
-
Click ADD in the upper right corner
-
Fill in the required fields and save
Tip: Only add content needed for the issue you're working on—this saves time during development.
-
Find or create an issue
Browse existing issues or create a new one. Assign yourself to the issue you'll work on.
-
Create a feature branch
Branch names should be descriptive and reference the issue:
git checkout -b 335-adding-hover-to-landing-page # for issue #335Each branch should address a single issue.
-
Make your changes
Write code, test locally, and commit with clear messages.
-
Submit a pull request
Push your branch and open a PR against
master. PRs undergo code review and local testing before merging.
We use Pa11y CI with the Axe engine to run automated accessibility checks against the local site. Tests are configured in .pa11yci.json and target WCAG 2.0 AA compliance.
Make sure the website is running first, then run the a11y service:
# Start the website (if not already running)
docker-compose -f docker-compose-local-dev.yml up -d
# Run accessibility checks
docker-compose -f docker-compose-local-dev.yml --profile testing run --rm a11yTo generate a JSON report:
docker-compose -f docker-compose-local-dev.yml --profile testing run --rm a11y sh -c "
npm install -g pa11y-ci &&
pa11y-ci --config /workspace/.pa11yci.json --json | tee /workspace/a11y-report.json
"Edit .pa11yci.json to add or remove URLs to test. The urls array lists every page that will be checked.
-
UI changes require mockups: Include before/after screenshots or design mockups so we can collectively agree on the visual direction. See issue #287 for a good example.
-
One issue per branch: Keep PRs focused on a single issue for easier review.
-
Test locally: Verify your changes work before submitting.
-
Run accessibility checks: Run the a11y service before submitting UI changes to catch WCAG violations early.
-
Clear descriptions: Explain what changed and why in your PR description.
See our Troubleshooting Wiki for common issues and solutions.