A website to host albums/reviews
-
Create a python virtual environment
python -m venv venv
-
Activate the new virtual environment
source venv/bin/activate
-
Install required python modules
pip install -r requirements.txt
-
Add this line to docker-compose.yml under
reviews-backend:
right abovenetworks:
ports: - "8001:8001"
-
You might need to comment out the var
AUTHENTICATION_BACKENDS
in settings.py. I don't remember, so if you find out it is or isn't necessary, please update this README 😅 -
Build the docker container from the Dockerfile
docker build .
-
Launch docker container. If you want it to live in the background instead of sitting in your terminal, add
-d
to the end.docker compose up --watch
-
Open a shell inside the docker container
docker exec -it wrct-reviews-backend bash
-
Create an admin user account for yourself for local development
python3 manage.py createsuperuser
-
In your browser, go to 127.0.0.1:8001 or 0.0.0.0:8001 to access the app. You can also access the Django admin page by appending /admin to the URL.
-
Add some albums if you need test data. TODO: Add some test data to this repo or add an easy way to copy data from the real database to local developemnt.
-
When you're done, shut down the docker container by pressing ctrl+C in the shell that it's running in, or by running this:
docker compose down
Next time, just run docker compose up
to get going again.
First developed in Summer 2024 by WRCT eng staph and then maintained since