Photo manager and gallery made of Vanilla JS, Bash scripts, and PHP
- Plug DSLR into Raspberry-Pi (or any computer with this set up)
- Open web browser and go to the ip-address/photo-gal
- Log into an admin account (after making a user an admin in the setup)
- Use the UI to download photos from DSLR (creates thumbs and lightbox-sized images too)
- Optionally upload galleries to a server
$ bash setup.sh
Sng can be used to serve PHP from somewhere in your home folder. Nginx, PHP, and MySQL are required. Sng requires npm, the neatest way to install that is with nvm (Node Version Manager).
- Place a file named
.sng.conf
in the parent directory of the project. Place these contents in.sng.conf
:
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
-
Run
sng
from that parent directory. -
Upload albums without a password (mandatory for UI uploads)
$ ssh-keygen
$ ssh-copy-id user@your_website.com -P 22