Local setup - WikipediaLibrary/TWLight GitHub Wiki
Quick Installation for Developers
- Get Docker and Docker Compose
- Download the repository
- From the repository folder, run
docker-compose up --build
- Alternatively, to run with the Django Debug Toolbar enabled
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.debug_toolbar.yml up --build
- Run migrations with
docker-compose exec twlight /app/bin/virtualenv_migrate.sh
- Check the tool is running successfully at localhost
See Shell scripts for guidance on running tests and other Django tools.
After setting up we recommend logging in and then running the example data generation script, which will create a range of sample data to test with: docker-compose exec twlight /app/bin/virtualenv_example_data.sh
. It will also make the account you logged in with a superuser, which bypasses the eligibility requirement to access the library. See Shell scripts#example data for more information.
You can get an interactive shell with docker-compose exec twlight bash
.
Setting up editorconfig
This project uses editorconfig to maintain consistent coding styles. Some IDEs and editors don't need to install a plugin for it to work, but others do. Please verify that you have the plugin installed if that is the case.