fedi-feed-router/README.md

129 lines
3.3 KiB
Markdown
Raw Permalink Normal View History

2026-01-23 00:30:05 +01:00
# FFR (Feed to Fediverse Router)
A Laravel-based application for routing RSS/Atom feeds to Fediverse platforms like Lemmy. Built with Laravel, Livewire, and FrankenPHP for a modern, single-container deployment.
## Features
- **Feed aggregation** - Fetch articles from multiple RSS/Atom feeds
- **Fediverse publishing** - Automatically post to Lemmy communities
- **Route configuration** - Map feeds to specific channels with keywords
- **Approval workflow** - Optional manual approval before publishing
- **Queue processing** - Background job handling with Laravel Horizon
- **Single container deployment** - Simplified hosting with FrankenPHP
## Self-hosting
The production image is available at `codeberg.org/lvl0/ffr:latest`.
### docker-compose.yml
```yaml
services:
app:
image: codeberg.org/lvl0/ffr:latest
container_name: ffr_app
restart: always
ports:
- "8000:8000"
environment:
APP_KEY: "${APP_KEY}"
APP_URL: "${APP_URL}"
DB_DATABASE: "${DB_DATABASE}"
DB_USERNAME: "${DB_USERNAME}"
DB_PASSWORD: "${DB_PASSWORD}"
REDIS_HOST: redis
REDIS_PORT: 6379
volumes:
- app_storage:/app/storage
depends_on:
- db
- redis
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/up"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: mariadb:11
container_name: ffr_db
restart: always
environment:
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
volumes:
- db_data:/var/lib/mysql
redis:
image: redis:7-alpine
container_name: ffr_redis
restart: always
volumes:
- redis_data:/data
volumes:
db_data:
redis_data:
app_storage:
2025-06-30 20:29:55 +02:00
```
2026-01-23 00:30:05 +01:00
### Environment Variables
2025-08-15 10:32:28 +02:00
2026-01-23 00:30:05 +01:00
| Variable | Required | Description |
|----------|----------|-------------|
| `APP_KEY` | Yes | Encryption key. Generate with: `echo "base64:$(openssl rand -base64 32)"` |
| `APP_URL` | Yes | Your domain (e.g., `https://ffr.example.com`) |
| `DB_DATABASE` | Yes | Database name |
| `DB_USERNAME` | Yes | Database user |
| `DB_PASSWORD` | Yes | Database password |
| `DB_ROOT_PASSWORD` | Yes | MariaDB root password |
2025-08-15 10:32:28 +02:00
2026-01-23 00:30:05 +01:00
## Development
2025-06-30 20:29:55 +02:00
2026-01-23 00:30:05 +01:00
### NixOS / Nix
2025-06-30 20:29:55 +02:00
2026-01-23 00:30:05 +01:00
```bash
git clone https://codeberg.org/lvl0/ffr.git
cd ffr
nix-shell
2025-06-30 20:29:55 +02:00
```
2025-06-30 21:28:15 +02:00
2026-01-23 00:30:05 +01:00
The shell will display available commands and optionally start the containers for you.
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
#### Available Commands
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
| Command | Description |
|---------|-------------|
| `dev-up` | Start development environment |
| `dev-down` | Stop development environment |
| `dev-restart` | Restart containers |
| `dev-logs` | Follow app logs |
| `dev-logs-db` | Follow database logs |
| `dev-shell` | Enter app container |
| `dev-artisan <cmd>` | Run artisan commands |
| `prod-build [tag]` | Build and push prod image (default: latest) |
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
#### Services
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
| Service | URL |
|---------|-----|
| App | http://localhost:8000 |
| Vite | http://localhost:5173 |
| MariaDB | localhost:3307 |
| Redis | localhost:6380 |
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
### Other Platforms
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
Contributions welcome for development setup instructions on other platforms.
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
## License
2025-08-02 03:07:27 +02:00
2026-01-23 00:30:05 +01:00
This project is open-source software licensed under the [AGPL-3.0 license](LICENSE).
2025-08-02 03:07:27 +02:00
2025-08-15 10:32:28 +02:00
## Support
2026-01-23 00:30:05 +01:00
For issues and questions, please use [Codeberg Issues](https://codeberg.org/lvl0/ffr/issues).