Under the /mnt/data (the encrypted disk) let's create a new directory, e.g. videos. This will be assigned to administrators group
mkdir /mnt/data/images
chown services:services /mnt/data/images
chmod 776 /mnt/data/images
Create a couple of groups, the first will have write access
groupadd share_images
groupadd share_images_readonly
Add the users. Johnd will have readonly access
usermod -a -G share_images main
usermod -a -G share_images_readonly johnd
Edit the samba config to add the new share. You can add the "veto files=..." to hide certain dirs
Add to he end of ** /etc/samba/smb.conf **
[Images]
comment = Images
path = /mnt/data/images
read only = no
guest ok = no
create mask = 0775
directory mask = 0775
force_user = services
force_group = services
read list = @share_images_readonly
write list = @share_images
Run the following
mkdir -p /mnt/data/apps/piwigo/config
mkdir -p /mnt/data/apps/piwigo/mariadb
mkdir -p /mnt/data/apps/piwigo/bin
mkdir -p /mnt/data/apps/piwigo/bin/galleries
chmod 777 /mnt/data/apps/piwigo/config
chmod 777 /mnt/data/apps/piwigo/mariadb
chmod 777 /mnt/data/apps/piwigo/bin
chmod 777 /mnt/data/apps/piwigo/bin/galleries
chmod 777 /mnt/data/apps/piwigo
Go to Portainer/stacks and add the stack
Remember to change the mysql passwords on the docker compose. Here i use somepass
version: '2'
networks:
piwigo:
name: piwigo
driver: bridge
services:
piwigodb:
image: mariadb
container_name: mariadb-piwigo
restart: always
environment:
MYSQL_ROOT_PASSWORD: sompass
MYSQL_DATABASE: piwigo
MYSQL_USER: someuser
MYSQL_PASSWORD: somepass
networks:
- dockernet
- piwigo
volumes:
- /mnt/data/apps/piwigo/mariadb:/var/lib/mysql
piwigo:
image: linuxserver/piwigo
container_name: piwigo
networks:
- dockernet
- piwigo
volumes:
- /mnt/data/apps/piwigo/config:/config
- /mnt/data/apps/piwigo/bin:/gallery
- /mnt/data/images:/images
ports:
- 11000:80
restart: unless-stopped
piwigosetup:
image: linuxserver/piwigo
depends_on:
- piwigo
volumes:
- /mnt/data/apps/piwigo/config:/config
- /mnt/data/apps/piwigo/bin:/gallery
- /mnt/data/images:/images
entrypoint: [ "sh", "-c", "sleep 60 && ln -s /images /gallery/galleries/default"]
Setup using "piwigodb" as the mariadb sql database
Go on /mnt/data/apps/piwigo/bin/plugins
wget https://github.com/kendarorg/ldap_login/archive/refs/heads/master.zip
unzip master.zip
mv ldap-login_master Ldap_Login
chmod -R 777 Ldap_Login
Create some a group (groupOfUniqueNames) assign the user main to all
cn=piwigo,ou=groups,dc=kendar,dc=org
cn=admins,cn=piwigo,ou=groups,dc=kendar,dc=org
cn=webmasters,cn=piwigo,ou=groups,dc=kendar,dc=org
Go on plugins http://mynas:11000/admin.php?page=plugins and enable the LdapLogin plugin Then go to settings http://mynas:11000/admin.php?page=plugin§ion=LdapLogin%2Fadmin.php
The other two pages are "Unknown".. no responisibility for errors :P
Now you can login with a user from ldap and make it an admin if needed assigning it to the group admins or webmasters