Bounce is a web app built in Django that locates and displays the nearest basketball courts in the area. With over 48,000 documented basketball across North America, there is bound to be one near you. The goal of this project is to build a community for basketball and other sports enthusiasts.
Visit Contributing.md
- Basketball court listing of outdoor courts near specified address/location
- Light and Dark Theme for Maps
- GraphQL / REST API endpoint
- Implement more testing and test coverage (API, Model, End to End Testing with Cypress.io
- Building CI/CD pipeline and linting for better code reviewing and deployment
- Interfaces for User Feedback
- Ensure pages are mobile friendly
- Load courts through REST / GraphQL API
- User Accounts
- Court Ratings
- Save frequently visited courts
- Submit Court to be added to Map
- Decouple front and backend
Bounce uses a number of open source projects and APIs to work properly:
- Heroku - PAAS to Host Bounce
- Django - Python Web Framework
- LocationIQ API - used to get reverse geocoding results for markers
- Mapbox API - used to provide forward-geocoding results and mapping
- PostgreSQL - SQL database for scalability, modularity, and geoquerying support
-
Install Docker and Docker Compose
-
Make
docker_entrypoint.sh
executable# Linux chmod +x docker_entrypoint.sh
-
Start and build the 2 containers
--build
builds the images defined in thedocker-compose.yml
file.-d
dettaches the terminal from the building process.- Finally the script from (
docker_entrypoint.sh
) is executed.
# In the same directory as `docker-compose.yml` docker-compose up -d --build
- If there are errors you can see the logs
docker-compose logs
-
Load Initial Database Models
- It's also necessary to load in the fixtures when setting up the database:
docker-compose exec web python manage.py loaddata bounce_data.json
-
Go to http://localhost:8000
- You should see the frontend of the project
-
Enter a shell within the Docker container
- To enter an interactive shell (in this case for the "web" service), you can use
docker-compose exec web bash
-
Create a superuser (Optional)
- You may enter an interactive shell within the Docker container (in this case the container corresponding to the "web" service)
- In the same directory as
docker-compose.yml
run
# This open a bash shell inside the container docker-compose exec web bash
-
Then run
python manage.py createsuperuser
-
Run
exit
to exit the container. It will keep running.
-
To stop the containers run
docker-compose stop
⚠️ Be careful withdocker-compose down
which stops the container but also removes them. =======
Ensure that your .env file is present and the required variables are set. Sometimes starting fresh can help, since things like volumes will persist even after a container is removed, which can cause issues. You can remove all docker containers and volumes using the command:
docker-compose down && docker rm -f $(docker ps -a -q) && docker volume rm $(docker volume ls -q)
and then trying the above steps again.