Prerequisites Hyperlink to this header
Setting up the developer environment Hyperlink to this header
- Get a copy of the BookWyrm codebase from GitHub. You can create a fork of the repository, and then use
git cloneto download the code to your computer.
- Go to the directory which contains the code on your computer, you'll be working from there from here on out.
- Set up your development environment variables file by copying the dev example file (
.env.dev.example) into a new file named
.env. In the command line, you can do this with:
cp .env.dev.example .env
Optionally, you can use a service like ngrok to set up a domain name, and set the
DOMAINvariable in your
.envfile to the domain name generated by ngrok.
Set up nginx for development by coping the developer nginx configuration file (
nginx/development) into a new file named
cp nginx/development nginx/default.conf
- Start the application. In the command line, run:
docker-compose build docker-compose run --rm web python manage.py migrate docker-compose run --rm web python manage.py initdb docker-compose up
- Once the build is complete, you can access the instance at
Editing static files Hyperlink to this header
collectstatic command in order for your changes to have effect. You can do this by running:
If you have installed yarn, you can run
yarn watch:static to automatically run the previous script every time a change occurs in