Developer Environment

Setting up the developer environmentHyperlink to this header

Set up the development environment file:

cp .env.dev.example .env

Set up nginx for development nginx/default.conf:

cp nginx/development nginx/default.conf

For most testing, you'll want to use ngrok. Remember to set the DOMAIN in .env to your ngrok domain.

You'll have to install the Docker and docker-compose. When you're ready, 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 http://localhost:1333

Editing static filesHyperlink to this header

If you edit the CSS or JavaScript, you will need to run Django's collectstatic command in order for your changes to have effect. You can do this by running:

./bw-dev collectstatic

If you have installed yarn, you can run yarn watch:static to automatically run the previous script every time a change occurs in bookwyrm/static directory.