Compare commits

..

No commits in common. "4eaf38d4bb09d35d89d8aa68249e6dfadcaed011" and "1be821b8cb00cbacf3f2799fec7018eb86ce9905" have entirely different histories.

16 changed files with 8 additions and 66 deletions

20
LICENSE
View File

@ -1,20 +0,0 @@
MIT License
Copyright (c) 2024 Stefan Forstenlechner
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -2,14 +2,6 @@
A simple picture gallery. No database required. Photos can simply be stored in your file system. Add and remove photos. Simple picture gallery will automatically show them and create thumbnails.
All you need is your photos and [docker](https://www.docker.com/).
Simple Picture Gallery is a modern looking web app due to [Material UI](https://mui.com/material-ui/), [React Photo Album](https://react-photo-album.com/) and [Yet Another React Lightbox](https://yet-another-react-lightbox.com/).
## Screenshots
![Simple Picture Gallery](doc/images/main.png)
## Getting Started
### Information
@ -18,11 +10,11 @@ Folders should only contain images and folders. Folders should not contain any o
### Docker
An easy way to run simple picture gallery is with docker.
The easiest way to run simple picture gallery is with docker.
```shell
docker pull gitea.forstenlechner.dev/stefan/simple-picture-gallery:latest
docker run -p 3005:3001 -v /mnt/path/to/pictures:/usr/src/app/public --name my-picture-gallery gitea.forstenlechner.dev/stefan/simple-picture-gallery:latest
docker build . -t simple-picture-gallery
docker run -p 3005:3001 -v /mnt/path/to/pictures:/usr/src/app/public --name my-picture-gallery simple-picture-gallery
```
#### Customization
@ -38,34 +30,12 @@ VITE_FAVICON_HREF=<URL to your favicon>
And run docker with `--env-file .env`
```shell
docker run -p 3005:3001 -v /mnt/path/to/pictures:/usr/src/app/public --env-file .env --name my-picture-gallery gitea.forstenlechner.dev/stefan/simple-picture-gallery:latest
```
### Docker compose
Even easier to run it using docker compose.
```dockerfile
services:
gallery:
image: gitea.forstenlechner.dev/stefan/simple-picture-gallery:latest
container_name: my-picture-gallery
environment:
# customize your gallery
- VITE_TITLE=My Gallery
- VITE_APPBAR_COLOR=#F8AB2D
restart: always
volumes:
- /mnt/path/to/pictures/:/usr/src/app/public
ports:
- "3005:3001"
docker run -p 3005:3001 -v C:/DATA/temp/bla:/usr/src/app/public --env-file .env --name my-picture-gallery simple-picture-gallery
```
### nginx
It is recommended to use a cache for the API calls so that not every request has to read from your file system again.
In case you are using nginx as reverse proxy already, here is an example config with a cache.
It is recommended to use a cache for the API calls so that not every request has to read the file system again.
```nginx
http {
@ -82,19 +52,12 @@ http {
location ~ /(images|directories|folderspreview) {
proxy_cache picture_gallery_cache;
proxy_cache_valid 200 302 60m;
proxy_cache_valid 200 302 600m;
proxy_cache_min_uses 1;
proxy_pass http://127.0.0.1:3005;
}
server_name gallery.domain.com
...
}
}
```
> **_NOTE:_** `proxy_cache_path` and `proxy_cache` need to use the same zone.
See [nginx documentation](https://nginx.org/en/docs/http/ngx_http_proxy_module.html) for more details and parameters.
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

View File

@ -1,7 +1,6 @@
{
"name": "simple-picture-gallery",
"version": "0.0.1",
"license": "MIT",
"version": "1.0.0",
"dependencies": {
"concurrently": "7.2.1",
"npm-check-updates": "^17.0.6"

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB