# Applications



linuxserver/pixapop (eol)

photoshow (nok)

Own photo (nok)



## Photonix Photo Manager

https://github.com/damianmoore/photonix

```bash
bruno@DS916:/volume1/docker/photoprism $ nano docker-compose.yml

bruno@DS916:/volume1/docker/photoprism $ sudo docker-compose stop photoprism
Password:
Stopping photoprism_photoprism_1 ... done
bruno@DS916:/volume1/docker/photoprism $ sudo docker-compose up -d --no-deps photoprism
Recreating photoprism_photoprism_1 ... done


bruno@DS916:/volume1/docker/photoprism $ nano docker-compose.yml
# index les fichiers sans les importer
bruno@DS916:/volume1/docker/photoprism $ sudo docker-compose exec photoprism photoprism index


```



## Lychee

https://github.com/LycheeOrg/Lychee

https://lycheeorg.github.io/docs/distributions.html

https://github.com/LycheeOrg/Lychee/releases

```bash
bruno@DS916:/volume1/web/Lychee/public/uploads/import/Pano $ cd ..
drwxr-xr-x    1 http     http            28 Nov 12 09:13 .
drwxr-xr-x    1 http     http            56 Oct  9 13:15 ..
drwxr-xr-x    1 root     root           674 Nov 12 09:21 Pano
-rw-r--r--    1 http     http             0 Oct  9 13:15 index.html
```

Yes, just create a Symbolic Link and allow your apache configuration to follow them. At website.com root `ln -s Lychee/public pics` and you will get exactly what you want: `website.com/pics`



https://github.com/GustavePate/lycheesync



## PiGallery2

https://github.com/bpatrik/pigallery2

`docker-compose.yml`

```yaml
version: '3'
services:
  pigallery2:
    image: bpatrik/pigallery2:latest
    container_name: pigallery2
    environment:
      - NODE_ENV=production
    volumes:
      - "./config:/app/data/config" # CHANGE ME
      - "db-data:/app/data/db"
      - "/volume1/photo:/app/data/images" # CHANGE ME
      - "./tmp:/app/data/tmp" # CHANGE ME
    ports:
      - 35000:80
    restart: always

volumes:
  db-data:
```



## piwigo

https://piwigo.org

https://pwgdemo.kuther.net

https://fr.piwigo.com/blog/2020/03/12/bootstrap-darkroom-nouveau-theme-piwigo-com/

`docker-compose.yml`

```yaml
version: "2.1"
services:
  piwigo:
    image: mathieuruellan/piwigo
    container_name: piwigo2
    environment:
      - PUID=1026   ##change to your user id. It cannot be the root user
      - PGID=100    ##change to your user group ID
      - TZ=Europe/Paris
    volumes:
      - /volume1/docker/piwigo2/data/galleries:/var/www/galleries
      - /volume1/docker/piwigo2/data/local:/var/www/local
      - /volume1/docker/piwigo2/data/plugins:/var/www/plugins
      - /volume1/docker/piwigo2/data/themes:/var/www/themes
      - /volume1/docker/piwigo2/cache:/var/www/_data/i
      - /volume1/docker/piwigo2/upload:/var/www/upload
      - /var/log
      - /volume1/docker/piwigo2/log:/var/log/apache2
    ports:
      - 8125:80
    restart: unless-stopped
  mariadb:
    image: mariadb:latest
    container_name: mysqlpiwigo2
    environment:
      - PUID=0   ##change to your user id. I use root since I am on a closed system
      - PGID=0   ##change to your user group ID. Again I use root since I am on a closed system
      - MYSQL_ROOT_PASSWORD=xxx ##set a password
      - TZ=Europe/Paris
      - MYSQL_DATABASE=piwigo
      - MYSQL_USER=piwigo
      - MYSQL_PASSWORD=xxx
    volumes:
      - /volume1/docker/piwigo2/mysql/:/var/lib/mysql
    ports:
      - 3306:3306
    restart: unless-stopped
```

Une fois le container crée et exécuté, on ouvre le navigateur sur la page http://ds916.local:8125. La page d'installation de Piwigo doit s'afficher.

<u>Base de donnée:</u> remplir les champs comme ceux du docker-compose.yml, section mariadb.  Pour host, il faut connaître l'IP du serveur bdd:

```bash
❯ sudo docker container ls --format 'table {{.ID}}\t{{.Names}}'
CONTAINER ID        NAMES
700a2cd00cba        mysqlpiwigo2

❯ sudo docker container exec 700a2cd00cba hostname -I
172.18.0.3
```

<u>Administration:</u> remplir les champs, puis cliquer sur **Démarrer l'installation**.



## thumbsup

https://thumbsup.github.io

https://github.com/thumbsup/thumbsup



Sur le NAS Synology, erreur avec <u>thumbsup (1.15) installé avec npm et GraphicMagick</u>.



Il faut passer par **Docker**:

```bash
bruno@DS916:/volume1/docker/thumbsup $ l
drwxrwxrwx    1 bruno    users           52 Nov 15 10:52 input
-rwxrwxrwx    1 bruno    users          171 Nov 15 09:34 install2.sh
drwxrwxrwx    1 bruno    users            0 Nov 15 10:38 output
drwxrwxrwx    1 bruno    users          140 Nov 15 11:10 website
```

`/volume1/docker/thumbsup/install2.sh`

```bash
#/bin/bash -e

docker run \
  -v /volume1/photo/Flore:/input:ro \
  -v `pwd`/website:/output \
  thumbsupgallery/thumbsup:latest \
  thumbsup --config /input/config.json
```

Le fichier `config.json` est placé à la racine du dossier source de photos:

```bash
bruno@DS916:/volume1/photo/Flore $ l
drwxrwxrwx    1 bruno    PhotoSta      1706 Nov 15  2016 Arbres
drwxrwxrwx    1 bruno    PhotoSta       136 Mar  8  2016 Champignons
drwxrwxrwx    1 bruno    PhotoSta      2592 Nov 15  2016 Fleurs
-rwxrwxrwx    1 bruno    users           78 Nov 15 11:08 config.json
```

`/volume1/photo/Flore/config.json`

```bash
{ 
	"input": "/input",
	"output": "/output",
	"thumb-size": 250,
	"large-size": 1600,
	"photo-download": "symlink",
	"cleanup": true,
	"sort-albums-by": "title",
	"sort-media-by": "date",
	"sort-media-direction": "desc",
	"home-album-name": "Accueil",
	"theme": "flow",
	"title": "Photos...",
	"embed-exif": true,
	"locale": "fr"
}
```

Pour lancer **thumbsup**:

```bash
bruno@DS916:/volume1/docker/thumbsup $ sudo ./install2.sh

2020-11-15T11:03:51.737Z thumbsup:info
2020-11-15T11:03:51.783Z thumbsup:info ┌───────────────────────────────────┐
2020-11-15T11:03:51.783Z thumbsup:info │                                   │
2020-11-15T11:03:51.783Z thumbsup:info │  Gallery generated successfully!  │
2020-11-15T11:03:51.783Z thumbsup:info │  4 albums, 82 photos, 0 videos    │
2020-11-15T11:03:51.783Z thumbsup:info │                                   │
2020-11-15T11:03:51.783Z thumbsup:info └───────────────────────────────────┘
2020-11-15T11:03:51.783Z thumbsup:info
```

Pour accèder à la galerie depuis le serveur web, on crée un lien symbolique:

```bash
bruno@DS916:/volume1/docker/thumbsup $ ln -s /volume1/docker/thumbsup/website/ /volume1/web/thumbsup
```

La galerie est alors accessible depuis http://192.168.1.7/thumbsup/index.html.



#### **Update 15/03/2021:**

```bash
bruno@DS916:/volume1/photo/thumbsup $ ls -la
-rwxrwxrwx    1 bruno    users          440 Mar 12 06:51 config-npm.json
-rwxrwxrwx    1 bruno    users          487 Mar 14 18:19 config.json
-rwxrwxrwx    1 bruno    users          459 Mar 14 10:52 config.json.bak
drwxrwxrwx    1 bruno    users          124 Mar 14 12:48 theme-flow
drwxrwxrwx    1 bruno    users          122 Nov 29 14:35 theme-flow-bruno
-rwxrwxrwx    1 bruno    users           24 Nov 15 12:51 theme_options.json
-rwxrwxrwx    1 bruno    users          428 Mar 14 11:58 thumbsup.sh
-rwxrwxrwx    1 bruno    users          303 Mar 15 09:40 thumbsup_update.sh
```

<u>Fichier de configuration de thumbsup</u> (config.json):

```json
{
        "input": "/input/Flore",
        "output": "/output/gallery",
        "exclude": ["_Archived Items/","thumbsup"],
        "include-raw-photos": true,
        "thumb-size": 250,
        "large-size": 1600,
        "photo-download": "symlink",
        "cleanup": true,
        "sort-albums-by": "title",
        "sort-media-by": "date",
        "sort-media-direction": "desc",
        "home-album-name": "Accueil",
        "theme-path": "/input/thumbsup/theme-flow/theme",
        "title": "Photos...",
        "embed-exif": true,
        "locale": "fr",
        "footer": "bruno@clicclac.info"
}
```

<u>Fichier de configuration du thème</u> (theme_options.json):

```bash
{
        sliderInterval: 500
}
```



Pour lancer **thumbsup**:

```bash
bruno@DS916:/volume1/photo/thumbsup $ ./thumbsup.sh
```



```bash
$ nano thumbsup.sh
```

```bash
#/bin/bash -e

sudo docker run -t \
  -v /volume1/photo:/input:ro \
  -v /volume1/web:/output \
  thumbsupgallery/thumbsup:latest \
  thumbsup --config "/input/thumbsup/config.json"

echo "Changing forder permission /volume1/web/gallery/ ..."
# files/folders in /gallery/public don't have permissions, so we change them to 755

sudo chmod -R 755 /volume1/web/gallery/

echo "Go to https://clicclac.synology.me/gallery/"
echo ""
```

<u>Problème:</u> à chaque fois que l'on lance le script, un nouveau container thumbsupgallery est crée.

On va donc crée un <u>container thumbsupgallery</u> et on lui donne un nom (<u>thumbsup2.15</u>):

```bash
sudo docker run --name thumbsup2.15 -t   -v /volume1/photo:/input:ro   -v /volume1/web:/output   thumbsupgallery/thumbsup:latest   thumbsup --config "/input/thumbsup/config.json"
```



Par la suite, pour mettre à jour la galerie, on se contentera de relancer le <u>container thumbsup2.15</u>:

```bash
$ nano thumbsup_update.sh
```

```bash
#/bin/bash -e

# Ne pas oublier l'option -i (attach the container’s STDIN)
sudo docker start -i thumbsup2.15

echo ""
echo "Changing forder permission /volume1/web/gallery/ ..."
# files/folders in /gallery/public don't have permissions, so we change them to 755

sudo chmod -R 755 /volume1/web/gallery/

echo "Go to https://clicclac.synology.me/gallery/"
echo ""
```



Pour re-lancer **thumbsup** et mettre à jour la galerie:

```bash
bruno@DS916:/volume1/photo/thumbsup $ ./thumbsup_update.sh
```



Quand on crée la galerie sur /volume1/web/gallery, il y a un problème avec le thème: les éléments du dossier <u>public</u> (theme-flow/theme/public) <u>n'ont pas les bonnes permissions</u>, d'où des <u>erreurs 403</u> sur les fichiers js/css... Il faut donc corriger les permissions:

```bash
$ sudo chmod -R 755 /volume1/web/gallery/
```



#### Galerie (/volume1/web/gallery):

Le dossier export est dans le root du serveur web:

```bash
bruno@DS916:/volume1/web $ ls -la

drwxr-xr-x    1 bruno    users          164 Mar 14 21:12 gallery

bruno@DS916:/volume1/web $ cd gallery/
drwxr-xr-x    1 bruno    users          164 Mar 14 21:12 .
drwxrwxrwx    1 root     root           406 Mar 14 11:27 ..
-rwxr-xr-x    1 root     root         41664 Mar 15 09:35 Arbres.html
-rwxr-xr-x    1 root     root          6458 Mar 15 09:35 Champignons.html
-rwxr-xr-x    1 root     root         56283 Mar 15 09:35 Fleurs.html
-rwxr-xr-x    1 root     root          8021 Mar 15 09:35 index.html
drwxr-xr-x    1 root     root            48 Mar 14 11:30 media
drwxr-xr-x    1 root     root           196 Mar 15 09:35 public
-rwxr-xr-x    1 root     root       1019904 Mar 14 21:12 thumbsup.db
-rwxr-xr-x    1 root     root           750 Mar 14 18:19 thumbsup.log
```





https://github.com/mickael-kerjean/filestash/wiki/Release-0.2:-Photo-Management

https://juicebox.net