From 66939bc9a3ebe974f0c40b7ebbcc71ff53a44df6 Mon Sep 17 00:00:00 2001 From: Jake Walker Date: Mon, 13 Jan 2025 13:09:23 +0000 Subject: [PATCH] update documentation --- LICENSE | 21 ++++++++++++++++++++ README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..03be08f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Jake Walker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index e69de29..d8c8f43 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,59 @@ +# Podcast Server + +This is a really simple project allowing for quick creation of podcasts. The server provides a simple admin panel to manage podcasts, and the ability to upload episodes. Any uploaded episodes have their audio level normalised, and are re-encoded to AAC which tends to use less disk space than original formats. + +## Deployment + +This is designed to sit behind a reverse proxy set up with forward authentication to protect the admin panel. Although, basic authentication should work too. + +```docker +services: + server: + image: git.jakew.me/jakew/podcast-generator:latest + restart: unless-stopped + environment: + - PG_FEEDS=["mypodcast"] + volumes: + - data:/work + +volumes: + data: +``` + +Example reverse proxy configuration for Caddy: + +```caddy +podcast.example.org { + # rewrite the base admin path to have a trailing slash + @admin path /admin /admin/* + + # apply forward authentication to just admin routes + # this is only an example, refer to your auth provider documentation + forward_auth @admin https://auth.example.org { + copy_headers X-Auth-User ... + } + + # proxy requests to the app + reverse_proxy podcast-server:8000 +} +``` + +### Environment Variables + +| Name | Default | Description | +| ---- | ------- | ----------- | +| `PG_DIRECTORY` | `./data` (`/data` for Docker) | Where any files are stored. This includes episodes, images and application data. | +| `PG_UPLOADS_DIRECTORY` | `./uploads` (`/uploads` for Docker) | Where any currently uploading files are stored. This directory does not need persistence in Docker. | +| `PG_FEEDS` | `["default"]` | A JSON array of the podcast names to be initially created. | + +## Development + +This project is made using Python and FastAPI. To get started, ensure you have [Python](https://www.python.org/) and the [uv](https://docs.astral.sh/uv/) package manager installed. + +```bash +# install dependencies +uv sync + +# run server in development mode +uv run fastapi dev main.py +```