This Django codebase is what powers apps.bikeaction.org
Aside from the Django web site, it also hosts our discord bot which is built with interactions.py.
First you'll want to ensure that you have created a fork of this repo in your own GitHub account. This will allow you to push your changes to GitHub so that they can be shared with the main repository via Pull Request.
The local development environment is built with Docker/Docker Compose and orchestrated with make.
Clone you fork of the repo:
git clone https://github.com/<your github username>/apps.git- Install WSL on windows. We'll use Ubuntu here, but you may use any other distro.
- Install "make":
sudo apt-get install make
- Open this project in VS Code and open a new WSL terminal in VS Code.
This opens WSL in the directory where your repo is.
Now run this command to start the service:
make serve
If you do not want to use VScode, you may also open WSL and run this command to get WSL to access your repo directory in the windows filesystem
cd /mnt/<path to repo in windows>If you are getting a python\r’: No such file or directory error, run:
git config core.autocrlf false
git rm --cached -r .
git reset --hardIf you see any error messages about your database after attempting to run make serve,
run the following command to get your database setup correctly
make migratemake serveThis command should do everything necessary to get the service up and running locally. After it completes, you can open a browser to http://localhost:8000/ to view the running web app.
You can login as admin@example.com with password password.
This user has full permissions across all parts of the app.
If you want to stop the app to save resources locally
make stopWill shut down the containers.
For a more complete "get rid of it all!" or to reset a broken environment:
make clean
Will completely destroy your local containers.
Deployments to apps.bikeaction.org occur on merge to main branch.
You can watch the progress of the deploy to our dokku instance in the GitHub Actions output.