https://github.com/dbeley/django-lastfm
A simple django website with some handy lastfm tools.
https://github.com/dbeley/django-lastfm
django lastfm lastfm-collage lastfm-collage-generator
Last synced: about 1 month ago
JSON representation
A simple django website with some handy lastfm tools.
- Host: GitHub
- URL: https://github.com/dbeley/django-lastfm
- Owner: dbeley
- Created: 2020-03-14T22:02:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-19T23:33:53.000Z (over 1 year ago)
- Last Synced: 2025-01-20T00:26:24.229Z (over 1 year ago)
- Topics: django, lastfm, lastfm-collage, lastfm-collage-generator
- Language: Python
- Homepage: https://lastfm-tools.dbeley.ovh
- Size: 150 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django-lastfm
Simple django site acting as a frontend for:
- [lastfm_cg](https://github.com/dbeley/lastfm_cg): Last.fm collage generator
- [lastfm_pg](https://github.com/dbeley/lastfm_pg): Last.fm playlist generator
- [lastfm-wordcloud](https://github.com/dbeley/lastfm-wordcloud): Last.fm wordcloud generator
- [lastfm-scraper](https://github.com/dbeley/lastfm-scraper): Some lastfm scripts
## Deployment Options
### NixOS (Recommended for NixOS users)
This project includes a NixOS module for easy declarative deployment. See [NIXOS.md](NIXOS.md) for detailed instructions.
Quick start with flakes:
```bash
# Development environment
nix develop
# Build the package
nix build
# Add to your NixOS configuration - see NIXOS.md and example-configuration.nix
```
### Docker
Use the provided `docker-compose.yml` for containerized deployment. See the Docker section below for details.
### Manual/Traditional Deployment
Follow the configuration steps below using `.ini` files or environment variables.
## Secrets
To run the website, you will need some config files.
### secret.ini
```
[django]
SECRET_KEY = secret_key_here
```
### config_lastfm.ini
```
[lastfm]
username=username_here
api_key=api_key_here
api_secret=api_secret_here
```
### .env file
```
REDIS_URL=redis://domain.tld
# optional, for docker + traefik
DEFAULT_NETWORK=traefik-network
DOMAIN=domain.tld
ALLOWED_HOSTS='127.0.0.1 localhost domain.tld'
```
### Environment variables
If you can't use ini files (i.e. when deploying with heroku), you can use those environment variables:
- `PYLAST_USERNAME`
- `PYLAST_API_KEY`
- `PYLAST_API_SECRET`
- `DJANGO_SECRET_KEY`
- `REDIS_URL`
## Docker Deployment
The project includes Docker support with `Dockerfile` and `docker-compose.yml`:
```bash
# Build and run with docker-compose
docker-compose up -d
```
This will start:
- Redis container for Celery
- Django web server with Gunicorn
- Celery worker for background tasks
