aggiunto wger e migliorata la descrizione degli esempi nel readme principale

This commit is contained in:
miracle091 2021-08-19 16:55:01 +02:00
parent 19feb1df11
commit e4f73abbce
Signed by: miracle091
GPG Key ID: 73D6D9792AD73C84
4 changed files with 270 additions and 7 deletions

View File

@ -5,18 +5,19 @@
* <img src="https://wtf.roflcopter.fr/pics/WeeQLrLG/0hMQ3BBw.png" width="28" /> [borg](borg) - semplice programma per i backup
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/foldingathome.png" width="28" /> [folding@home](folding@home/) - calcolo distrubuito per la ricerca medica
* <img src="https://wtf.roflcopter.fr/pics/o853DDTh/SJj4BbPg.png" width="28" /> [dozzle](dozzle/) - interfaccia web per controllare i log dei container
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/gitea.png" width="28" /> [gitea](gitea/) - simil-github
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/gitea.png" width="28" /> [gitea](gitea/) - un'alternativa a github/gitlab locale
* <img src="https://raw.githubusercontent.com/bastienwirtz/homer/main/public/logo.png" width="28" /> [homer](homer/) - semplice pagina per tutti i servizi che volete
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/jellyfin.png" width="28" /> [jellyfin](jellyfin/) - simil-netflix
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/komga.png" width="28" /> [komga](komga/) - gestore per manga/comics
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/youtubedl.png" width="28" /> [metube](metube/) - frontend per youtube-dl
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/jellyfin.png" width="28" /> [jellyfin](jellyfin/) - server per la gestione e la transcodifica di musica, film e serie tv
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/komga.png" width="28" /> [komga](komga/) - server per la gestione di manga e comics
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/youtubedl.png" width="28" /> [metube](metube/) - frontend moderno per youtube-dl
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/miniflux.png" width="28" /> [miniflux](miniflux/) - gestore di feed minimale
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/navidrome.png" width="28" /> [navidrome](navidrome/) - ascolto e gestione di file musicali (MP3/M4A/etc)
* <img src="https://wtf.roflcopter.fr/pics/M3oHBIh3/Fw7xh9SE.png" width="28" /> [podgrab](podgrab/) - ascolto e gestione di podcast
* <img src="https://wtf.roflcopter.fr/pics/M3oHBIh3/Fw7xh9SE.png" width="28" /> [podgrab](podgrab/) - server per l'ascolto e gestione di podcast
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/syncthing.png" width="28" /> [syncthing](syncthing/) - simil-dropbox ma decentralizzato
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/transmission.png" width="28" /> [transmission](transmission/) - client bittorrent
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/unifi.png" width="28" /> [unifi-controller](unifi/) - gestione dell'hardware ubiquiti
* <img src="https://raw.githubusercontent.com/containrrr/watchtower/main/logo.png" width="28" /> [watchotwer](watchtower/) - aggiornamento automatico delle immagini
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/png/unifi.png" width="28" /> [unifi-controller](unifi/) - interfaccia web per la gestione dell'hardware ubiquiti
* <img src="https://raw.githubusercontent.com/wger-project/wger/master/wger/core/static/images/logos/logo.svg" width="28" /> [wger](wger/) - server per la gestione della vostra alimentazione e allenamenti
* <img src="https://raw.githubusercontent.com/containrrr/watchtower/main/logo.png" width="28" /> [watchotwer](watchtower/) - aggiornamento automatico dei container
* altri in arrivo, stay tuned™
</details></br>

40
wger/.env Normal file
View File

@ -0,0 +1,40 @@
# Generale
POSTGRES_DATA=/home/docker/wger/db
WGER_DATA=/home/docker/wger/static
WGER_DATA=/home/docker/wger/media
WGER_WEBUI_PORT=8000
# Postgres
POSTGRES_DB=wger
POSTGRES_USER=wger
POSTGRES_PASSWORD=wger
# Database
DJANGO_DB_ENGINE=django.db.backends.postgresql
DJANGO_DB_DATABASE=wger
DJANGO_DB_USER=wger
DJANGO_DB_PASSWORD=wger
DJANGO_DB_HOST=db
DJANGO_DB_PORT=5432
# Cache
DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
DJANGO_CACHE_LOCATION=redis://cache:6379/1
DJANGO_CACHE_TIMEOUT= 1296000 # 60*60*24*15, 15 giorni
DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
DJANGO_MEDIA_ROOT=/home/wger/media
# Da cambiare con qualcosa di diverso
SECRET_KEY = CAMBIAMIPERFAVORE
# Registrazioni
ALLOW_REGISTRATION = True
ALLOW_GUEST_USERS = True
FROM_EMAIL=info@example.co
# Altro
DJANGO_DEBUG=False
WGER_USE_GUNICORN=True
TIME_ZONE=Europe/Amsterdam
SITE_URL=http://localhost:8000

172
wger/README.md Normal file
View File

@ -0,0 +1,172 @@
# Wger
<div align="center">
<img src="https://raw.githubusercontent.com/wger-project/wger/master/wger/software/static/images/workout.png" />
</div>
## Descrizione
[![Sito ufficiale](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=firefoxbrowser&style=flat&label=&message=Homepage)](https://wger.de/) [![Sorgente](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=github&style=flat&label=&message=Sorgente)](https://github.com/wger-project/wger) [![Docker Hub](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=docker&style=flat&label=&message=Docker&nbsp;Hub)](https://hub.docker.com/r/wger/base) [![Docs](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=readthedocs&style=flat&label=&message=Docs)](https://wger.readthedocs.io) [![Demo](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=jekyll&style=flat&label=&message=Demo)](https://wger.de/it/user/demo-entries)
Wger è un server per la gestione della vostra alimentazione e allenamenti:
- Interfaccia web multilingua e di facile comprensione
- Per comodità esiste anche un'app per [Android](https://play.google.com/store/apps/details?id=de.wger.flutter)
## Struttura file e cartelle
```
/home/
└── docker/
└── wger/
├── db/
├── media/
├── static/
├── .env
└── docker-compose.yml
```
* `db/` - cartella dove i dati del database vengono salvati
* `media/` - cartella dove le foto di wger vengono salvate
* `static/` - cartella dove i dati di wger vengono salvati
* `.env` - file contenenti le variabili environment per il docker-compose
* `docker-compose.yml` - file usato per creare il container
**N.B. Tutti i file e le cartelle devono essere creati a mano.**
## Esempi
Semplice esempio per iniziare ad usare subito il container
Le credenziali per il primo login sono le seguenti:
* Username: **admin**
* Password: **adminadmin**
### network
```bash
docker network create custom-bridge
```
oppure
```bash
podman network create custom-bridge
```
### docker-compose
`docker-compose.yml`
```yml
version: "3.8"
services:
db:
container_name: wger-db
image: postgres:13-alpine
security_opt:
- no-new-privileges:true
networks:
- custom-bridge
restart: always
env_file: .env
volumes:
- ${POSTGRES_DATA:-/home/docker/wger/db}:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "pg_isready", "-U", "wger"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 10s
cache:
container_name: wger-cache
image: redis:alpine
security_opt:
- no-new-privileges:true
networks:
- custom-bridge
restart: always
wger:
container_name: wger
image: wger/devel
networks:
- custom-bridge
restart: unless-stopped
depends_on:
- db
- cache
ports:
- ${WGER_WEBUI_PORT:-8000}:8000
env_file: .env
volumes:
- ${WGER_STATIC:-/home/docker/wger/static}:/wger/static
- ${WGER_MEDIA:-/home/docker/wger/media}/wger/media
networks:
custom-bridge:
name: custom-bridge
driver: bridge
```
`.env`
```bash
# Generale
POSTGRES_DATA=/home/docker/wger/db
WGER_DATA=/home/docker/wger/static
WGER_DATA=/home/docker/wger/media
WGER_WEBUI_PORT=8000
# Postgres
POSTGRES_DB=wger
POSTGRES_USER=wger
POSTGRES_PASSWORD=wger
# Database
DJANGO_DB_ENGINE=django.db.backends.postgresql
DJANGO_DB_DATABASE=wger
DJANGO_DB_USER=wger
DJANGO_DB_PASSWORD=wger
DJANGO_DB_HOST=db
DJANGO_DB_PORT=5432
# Cache
DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
DJANGO_CACHE_LOCATION=redis://cache:6379/1
DJANGO_CACHE_TIMEOUT= 1296000 # 60*60*24*15, 15 giorni
DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
DJANGO_MEDIA_ROOT=/home/wger/media
# Da cambiare con qualcosa di diverso
SECRET_KEY = CAMBIAMIPERFAVORE
# Registrazioni
ALLOW_REGISTRATION = True
ALLOW_GUEST_USERS = True
FROM_EMAIL=info@example.com # Indirizzo da dove vengono mandate le email
# Altro
DJANGO_DEBUG=False
WGER_USE_GUNICORN=True
TIME_ZONE=Europe/Amsterdam
SITE_URL=http://localhost:8000
```
## Reverse proxy
Ancora non ho previsto l'uso di un reverse proxy (Vedi [Todo](#Todo))
## Aggiornamento
### Automatico
Usando [watchtower](../watchtower) il container si aggiorna automaticamente
### Manuale
1. `docker-compose pull`
2. `docker-compose up -d`
3. `docker image prune`
## Backup e ripristino
### Backup
Usate [borg](../borg_backup) per fare i backup giornalieri dell'intera cartella `wger`
### Ripristino
Per una maggiore spiegazione sui passaggi da fare, controllate [qua](../borg_backup#user-content-controllare-la-cartella-dei-backup)
1. fermare il container `docker-compose down`
2. cancellare l'intera cartella `wger`
3. dal backup copiare la cartella `wger`
4. far ripartire il container `docker-compose up -d`
## Todo
Implementare:
- reverse proxy: **[caddy](https://caddyserver.com/)** o **[traefik](https://doc.traefik.io/traefik/)**

50
wger/docker-compose.yml Normal file
View File

@ -0,0 +1,50 @@
version: "3.8"
services:
db:
container_name: wger-db
image: postgres:13-alpine
security_opt:
- no-new-privileges:true
networks:
- custom-bridge
restart: always
env_file: .env
volumes:
- ${POSTGRES_DATA:-/home/docker/wger/db}:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "pg_isready", "-U", "wger"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 10s
cache:
container_name: wger-cache
image: redis:alpine
security_opt:
- no-new-privileges:true
networks:
- custom-bridge
restart: always
wger:
container_name: wger
image: wger/devel
networks:
- custom-bridge
restart: unless-stopped
depends_on:
- db
- cache
ports:
- ${WGER_WEBUI_PORT:-8000}:8000
env_file: .env
volumes:
- ${WGER_STATIC:-/home/docker/wger/static}:/wger/static
- ${WGER_MEDIA:-/home/docker/wger/media}/wger/media
networks:
custom-bridge:
name: custom-bridge
driver: bridge