From 16eca780f3ec3e0e8ff4fd7d2debce9af336c6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20H=C3=A1la?= Date: Sat, 23 Sep 2023 13:15:27 +0000 Subject: [PATCH] Extend README.md --- README.md | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 313df61..3f40976 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,40 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -# About -This project aims to create simple songbook for storing, managing and viewing songs with their respective chords. The songs are loaded once and then all filtering/searching happens on the client which means it is usable even in conditions with low or almost no internet access as it can be preloaded. The site can also generate PDF files from selected songs for offline viewing or printing. +# Song book +This project aims to create a song book for storing, managing and viewing songs. The songs are loaded once and then all the filtering/searching happens on the client, which enables it to be used even in low-internet environment. It can also automatically generate PDFs of the selected categories. Songs use Markdown with custom extensions for chords -# Getting Started +## Features + +* Use markdown to add songs +* Load-once site with all songs available +* Categorize songs into different Categories +* Generate PDFs of the selected categories/songs automatically +* Host multiple site (based on hostname) with only one instance + +# Running in production + +* Override any setting you want in `chords/settings/production.py` + * Set `ALLOWED_HOSTS`, `CSRF_TRUSTED_ORIGINS` to actual domain you want the site to exist on + * Generate `SECRET_KEY` unique for this site (https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY) + * Override both `CACHES` and `DATABASES` to point to your Redis and PostgreSQL (or other DB engine) respectively + * Set `TENANT_HOSTNAME` to the hostname that the site should use +* Setup gunicorn or any other WSGI server +* Setup Worker + * `poetry run python manage.py rqworker default --with-scheduler` + * Responsible for async PDF generation +* Setup NGINX or any other reverse proxy to expose the website + +# Developing + +## Dependencies + +* Python 3.9+ +* [gettext](https://www.gnu.org/software/gettext/) + * Used for compiling locales +* [Redis](https://redis.io/) + * Used as both cache and messaging queue for PDF generation + +## Getting Started First clone the repository from GitHub and switch to the new directory: @@ -23,12 +54,12 @@ You can now run the development server: make run -## FAQ +### FAQ 1. `poetry install` throws ERROR: Couldn't install package: rcssmin Package installation failed... - Install `python3-dev` for Debian-based distro or `python3-devel` for RHEL-based + Install `python3-dev` for Debian-based distro or `python3-devel` for RHEL-based distribution