Sign inSign up

iaean/nanopp2

By iaean

Updated about 8 years ago

nanoPhotosProvider2 for nanogallery2

Image
1

3.2K

iaean/nanopp2 repository overview

docker-nanoPP2

Docker container for nanoPhotosProvider2.

Features

  • Ultra small Alpine Linux based image
  • Complete autoconfiguration via environment

Installation

  • Get it from docker hub: docker pull iaean/nanopp2
  • -or- build the image as you normally would: docker build --tag=nanopp2 ./
  • Setting your environment...
  • ...Yee-haw!

Autoconfiguration via environment

Supported options are:

nanoPP2_TIMEOUT, nanoPP2_MEMORY, fileExtensions, sortOrder, titleDescSeparator, albumCoverDetector, ignoreDetector, maxSize, jpegQuality, jpegThumbsQuality, blurredImageQuality, allowedSizeValues, allowOrigins, unlimited

For explanation see nanoPhotosProvider2.

Docker --env-file example:

# nanoPP2_TIMEOUT=900
# nanoPP2_MEMORY=256M

albumCoverDetector=@@@
maxSize=3072
jpegQuality=95
jpegThumbsQuality=100
blurredImageQuality=5

# allowedSizeValues=50|100|225|150|200|300|auto
# allowOrigins=http://blog.example.com|https://blog.example.com

Running

To provide adequate security and handle your certificate bale, you are highly encouraged to run the http:// part behind a SSL enabled reverse proxy and publishing https:// only.

# All your SSL and virtual host stuff...

<Location />
  SSLRequireSSL
</Location>

ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"

ProxyPass / http://nanopp2:4711/ connectiontimeout=5 timeout=300
ProxyPassReverse / http://nanopp2:4711/
Running the docker image

Use docker to run the container as you normally would.

Production:

docker run -p 80:80 --env-file env --rm --name nanopp2 nanopp2

Devolopment:

docker run -it -p 80:80 --env-file env --rm --name nanopp2 nanopp2 /bin/sh

docker exec -it nanopp2 /bin/sh

Attach to nanogallery2
$("#nanogallery2").nanogallery2({
  // ...
  kind:             "nano_photos_provider2",
  dataProvider:     "//nanopp2/nano_photos_provider2.php",
  locationHash:     false
});

TODO

  • Replace the builtin PHP server with Apache

Tag summary

Content type

Image

Digest

Size

9.5 MB

Last updated

about 8 years ago

docker pull iaean/nanopp2