This is the backend repository for my music player project. The backend is built using Django and provides an API for managing and serving music-related data.
- Manages and serves music-related data.
- Supports pagination for efficient data retrieval.
- Dockerized for easy deployment and development.
- Automatically extracts the runtime and thumbnail from the metadata of the MP3 for later retrieval.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/your-username/music-player-backend.git cd music-player-backend
-
Create a
.env
file in the project root and setDJANGO_SECRET_KEY_DEMO
as well asDJANGO_SECRET_KEY_DEV
to a random key -
Now build and run the docker container
docker-compose up --build
The API can be accessed at:
- For local development:
http://localhost:8000
(non-SSL)https://localhost:8000
(SSL with a self-signed certificate)
- For production:
https://your-domain.com
(replaceyour-domain.com
with your actual domain)
This project uses Docker Compose to manage several services.
- db: A PostgreSQL database service
- web: The Django application being served through gunicorn.
- nginx: A Nginx service acting as a reverse proxy.
- certbot: A Certbot service for managing SSL certificates.
- GET /api/list-songs/?page
- Retrieve a paginated list of songs.
- supports pagination through the page query parameter
- GET /api/audio/
- Fetch song file
- Get /api/search/
- Searches for song based off title and artist
This project is licensed under the terms of the GNU General Public License (GPL).