refactor(backend): queue system presented

queue system is presented to be more scalable app and reliable download system

BREAKING CHANGE: redis is added and required now

close #5
This commit is contained in:
raiper34
2025-01-26 22:34:04 +01:00
parent 87067ce6ec
commit e5af53483a
28 changed files with 10517 additions and 21782 deletions
+1
View File
@@ -1,5 +1,6 @@
- Getting started
- [Using Docker](docker.md)
- [Build from source](source.md)
- [Environment variables](variables.md)
- [Changelog](CHANGELOG.md)
- [License](LICENSE.md)
+2 -3
View File
@@ -22,6 +22,5 @@ services:
```
### Environment variables
Name | Default | Description |
--- |---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
FORMAT | `mp3` | Format of downloaded files (currently fully supported only `mp3` but you can try whatever you want from [ffmpeg](https://ffmpeg.org/ffmpeg-formats.html#Muxers)) |
For detailed configuration, see available [Environment variables](variables.md).
+3 -13
View File
@@ -4,22 +4,12 @@ Spooty can be also build from source files on your own.
### Requirements
- Node v18.19.1 (it is recommended to use `nvm` node version manager to install proper version of node)
- Redis in memory cache
### Process
- install Node v18.19.1 using `nvm install` and use that node version `nvm use`
- from project root install all dependencies using `npm install`
- copy `.env.default` as `.env` in `src/backend` folder and modify desired environment properties (see list below)
- copy `.env.default` as `.env` in `src/backend` folder and modify desired environment properties (see [Environment variables](variables.md))
- build source files `npm run build`
- built project will be stored in `dist` folder
- start server `npm run start`
### `.env` environment variables
some behaviour and settings of Spooty can be configured using environment variables and `.env` file.
Name | Default | Description |
--- |--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
DB_PATH | `./config/db.sqlite` (relative to backend) | Path where Spooty database will be stored |
FE_PATH | `../frontend/browser` (relative to backend) | Path to frontend part of application |
DOWNLOADS_PATH | `./downloads` (relative to backend) | Path where downaloded files will be stored |
FORMAT | `mp3` | Format of downloaded files (currently fully supported only `mp3` but you can try whatever you want from [ffmpeg](https://ffmpeg.org/ffmpeg-formats.html#Muxers)) |
PORT | 3000 | Port of Spooty server |
- start server `npm run start`
+14
View File
@@ -0,0 +1,14 @@
# Environment variables
some behaviour and settings of Spooty can be configured using environment variables and `.env` file.
Name | Default | Description |
--- |---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
DB_PATH | `./config/db.sqlite` (relative to backend) | Path where Spooty database will be stored |
FE_PATH | `../frontend/browser` (relative to backend) | Path to frontend part of application |
DOWNLOADS_PATH | `./downloads` (relative to backend) | Path where downaloded files will be stored |
FORMAT | `mp3` | Format of downloaded files (currently fully supported only `mp3` but you can try whatever you want from [ffmpeg](https://ffmpeg.org/ffmpeg-formats.html#Muxers)) |
PORT | 3000 | Port of Spooty server |
REDIS_PORT | 6379 | Port of Redis server |
REDIS_HOST | localhost | Host of Redis server |
RUN_REDIS | true | Whenever Redis server should be started from backend (recommended for Docker environment) |