- Clone this repo.
- Install docker and docker-compose.
- Run
docker-compose up
from the project directory. - Open localhost:3000 in your browser.
- (Optional) If you plan to use the Berkeley APIs, you will need to add the following two lines to your bash profile. Ask one of the admins to give you the API_KEY and API_SECRET_KEY. Remember to restart your terminal after updating your bash profile for the changes to take effect.
export CLASSES_APP_ID="<API_KEY>"
export CLASSES_APP_KEY="<API_SECRET_KEY>"
- Make sure your dev environment has been set up, and
docker-compose up
has been run. - Run
make migrations
. - (Optional) If you set up your bash profile with the API credentials
described in the previous section, then you can run
make get-classes
to populate your database using the Berkeley API. - (Optional) Run
make superuser
to generate login credentials for the Django admin. - (Optional) Open localhost:8000/admin and log in using the credentials you just created.
Q: How can I add a new npm package?
A: Run PACKAGE=<your-new-package> make add-npm-package
.
--
Q: The backend container failed because of a race condition with the database. What should I do?
A: Run docker-compose restart backend
:)
--
Q: My containers didn't shut down properly after I hit . What should I do?
A: Run docker-compose kill
to shut down your containers. Run docker ps
to
confirm that you no longer have any running containers. Now, if you run
docker-compose up
again, everything should start up properly.
--
Q: Where can I find documentation on the API endpoints?
A: Run docker-compose up
, then go to
localhost:8000/search to view the api explorer.
--