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.
GraphQL / REST API endpoint
Bounce uses a number of open source projects and APIs to work properly:
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 the docker-compose.yml
file.-d
dettaches the terminal from the building process.docker_entrypoint.sh
) is executed.# In the same directory as `docker-compose.yml`
docker-compose up -d --build
docker-compose logs
Load Initial Database Models
docker-compose exec web python manage.py loaddata bounce_data.json
Go to http://localhost:8000
Enter a shell within the Docker container
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
docker-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.