2021-05-15 11:43:08 +02:00
|
|
|
# Miniflux in docker
|
|
|
|
|
2021-05-15 16:50:57 +02:00
|
|
|
<div align="center">
|
|
|
|
<img src="https://miniflux.app/images/overview.png" />
|
|
|
|
</div>
|
2021-05-15 11:43:08 +02:00
|
|
|
|
2021-05-15 16:01:01 +02:00
|
|
|
# Descrizione
|
2021-05-15 11:43:08 +02:00
|
|
|
|
|
|
|
* [Sito ufficiale](https://miniflux.app/)
|
|
|
|
* [Repo (Github)](https://github.com/miniflux/v2)
|
2021-05-17 12:45:18 +02:00
|
|
|
* [Documentazione](https://miniflux.app/docs/index.html)
|
2021-05-15 11:43:08 +02:00
|
|
|
|
|
|
|
Miniflux è un lettore di feed minimalista:
|
|
|
|
|
|
|
|
- Scritto in Go (Golang)
|
|
|
|
- Funziona solo con Postgresql
|
|
|
|
- Non usa alcun ORM
|
2021-05-17 12:45:18 +02:00
|
|
|
- Utilizzo di Javascript moderno (ES6 e API Fetch)
|
2021-05-15 11:43:08 +02:00
|
|
|
- Binario singolo compilato staticamente senza dipendenze
|
|
|
|
- Il numero di caratteristiche è volontariamente limitato
|
|
|
|
|
|
|
|
# Struttura file e cartelle
|
|
|
|
|
|
|
|
```
|
|
|
|
/home/
|
|
|
|
└── ~/
|
|
|
|
└── docker/
|
|
|
|
└── miniflux/
|
|
|
|
├── db/
|
|
|
|
├── .env
|
|
|
|
└── docker-compose.yml
|
|
|
|
```
|
|
|
|
|
2021-05-17 12:45:18 +02:00
|
|
|
* `db/` - cartella dove i dati del database vengono salvati
|
|
|
|
* `.env` - file contenenti le variabili environment per il docker compose
|
|
|
|
* `docker-compose.yml` - file usato per creare il container
|
2021-05-15 11:43:08 +02:00
|
|
|
|
2021-05-15 16:29:58 +02:00
|
|
|
Tutti i file e le cartelle devono essere creati a mano.</br>
|
2021-05-15 11:43:08 +02:00
|
|
|
|
|
|
|
# docker-compose
|
|
|
|
|
|
|
|
`docker-compose.yml`
|
|
|
|
```yml
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
container_name: miniflux-db
|
|
|
|
image: postgres:13-alpine
|
|
|
|
restart: always
|
2021-05-15 16:29:58 +02:00
|
|
|
env_file: .env
|
2021-05-15 11:43:08 +02:00
|
|
|
volumes:
|
2021-05-15 13:14:20 +02:00
|
|
|
- ${POSTGRES_DATA:-/home/docker/miniflux/db}:/var/lib/postgresql/data
|
2021-05-15 11:43:08 +02:00
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "pg_isready", "-U", "miniflux"]
|
|
|
|
interval: 1m30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
|
|
|
start_period: 10s
|
|
|
|
|
|
|
|
feeder:
|
|
|
|
container_name: miniflux
|
|
|
|
image: ghcr.io/miniflux/miniflux
|
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
ports:
|
2021-05-17 12:45:18 +02:00
|
|
|
- ${MINIFLUX_WEBUI_PORT:-8080}:8080
|
2021-05-15 16:29:58 +02:00
|
|
|
env_file: .env
|
2021-05-15 11:43:08 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "/usr/bin/miniflux", "-healthcheck", "auto"]
|
|
|
|
```
|
|
|
|
|
|
|
|
`.env`
|
|
|
|
```bash
|
2021-05-15 16:29:58 +02:00
|
|
|
# Generale
|
2021-05-17 11:57:31 +02:00
|
|
|
POSTGRES_DATA=/home/docker/miniflux/db
|
2021-05-17 12:45:18 +02:00
|
|
|
MINIFLUX_WEBUI_PORT=8080
|
2021-05-15 16:29:58 +02:00
|
|
|
|
|
|
|
# Postgres
|
|
|
|
POSTGRES_USER=miniflux
|
|
|
|
POSTGRES_PASSWORD=secret
|
|
|
|
|
|
|
|
# Miniflux
|
|
|
|
DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable
|
|
|
|
RUN_MIGRATIONS=1
|
|
|
|
CREATE_ADMIN=1
|
2021-05-15 11:43:08 +02:00
|
|
|
ADMIN_USERNAME=admin
|
|
|
|
ADMIN_PASSWORD=password
|
|
|
|
```
|
|
|
|
|
|
|
|
# Reverse proxy
|
|
|
|
|
|
|
|
Ancora non ho previsto l'uso di un reverse proxy. (Vedi [Todo](#Todo))
|
|
|
|
|
|
|
|
# Aggiornamenti
|
|
|
|
|
2021-05-21 12:59:44 +02:00
|
|
|
[Watchtower](https://gitea.it/miracle091/MasterpieceDockerCompose/src/branch/master/watchtower) aggiorna l'immagine automaticamente.
|
2021-05-15 11:43:08 +02:00
|
|
|
|
|
|
|
Aggiornamento manuale:
|
|
|
|
|
|
|
|
- `docker-compose pull`</br>
|
|
|
|
- `docker-compose up -d`</br>
|
|
|
|
- `docker image prune`
|
|
|
|
|
|
|
|
# Backup e ripristino
|
|
|
|
|
|
|
|
#### Backup
|
|
|
|
|
2021-05-15 13:14:20 +02:00
|
|
|
Copiare a mano, tramite crontab o altro la cartella `miniflux` (Vedi [Todo](#Todo))
|
2021-05-15 11:43:08 +02:00
|
|
|
|
|
|
|
#### Ripristino
|
|
|
|
|
|
|
|
* spegnere il container `docker-compose down`</br>
|
|
|
|
* cancellare l'intera cartella `miniflux`</br>
|
|
|
|
* dal backup copiare la cartella `miniflux`</br>
|
|
|
|
* far partire il container `docker-compose up -d`
|
|
|
|
|
|
|
|
# Todo
|
|
|
|
|
|
|
|
Implementare:
|
|
|
|
- reverse proxy: **[caddy](https://caddyserver.com/) o [traefik](https://doc.traefik.io/traefik/).**
|
|
|
|
- backup: **[borg](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/borg_backup) per fare i backup giornalieri completi.**
|