readme update

This commit is contained in:
Patrik J. Braun 2018-12-06 09:52:04 +01:00
parent 2cee1fe944
commit b15d102c84

View File

@ -14,26 +14,27 @@ Live Demo @ heroku: https://pigallery2.herokuapp.com/
- the demo page **first load** might take up **30s**: the time while the free webservice boots up - the demo page **first load** might take up **30s**: the time while the free webservice boots up
## Table of contents ## Table of contents
1. [Getting started](#getting-started-on-raspberry-pi-1) 1. [Getting started](#getting-started-on-raspberry-pi)
3. [Translate the page to your own language](#translate-the-page-to-your-own-language) 2. [Translate the page to your own language](#translate-the-page-to-your-own-language)
2. [Feature list](#feature-list) 3. [Feature list](#feature-list)
2. [Known errors](#known-errors) 4. [Known errors](#known-errors)
4. [Credits](#credits) 5. [Credits](#credits)
## Getting started (on Raspberry Pi 1) ## 1. Getting started (on Raspberry Pi)
### [Install NodeJs](https://nodejs.org/en/download/) ### 1.1 Direct Install
### 1.1.0 [Install NodeJs](https://nodejs.org/en/download/)
Download and extract Download and extract
```bash ```bash
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs sudo apt-get install -y nodejs
``` ```
Full node install on rapberry pi description: https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp Full node install on raspberry pi description: https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp
### Install PiGallery2 ### 1.1.2 Install PiGallery2
#### Install from release #### 1.1.2-a Install from release
```bash ```bash
cd ~ cd ~
@ -42,7 +43,7 @@ unzip pigallery2.zip
cd pigallery2 cd pigallery2
npm install npm install
``` ```
#### Install from source #### 1.1.2-b Install from source
```bash ```bash
cd ~ cd ~
wget https://github.com/bpatrik/pigallery2/archive/master.zip wget https://github.com/bpatrik/pigallery2/archive/master.zip
@ -52,7 +53,7 @@ npm install
``` ```
**Note**: if you run `npm run build-release`, it creates a clean, minified, production ready version from the app in the `release` folder, that is ready to deploy. **Note**: if you run `npm run build-release`, it creates a clean, minified, production ready version from the app in the `release` folder, that is ready to deploy.
### Run PiGallery2 #### 1.1.3 Run PiGallery2
```bash ```bash
npm start npm start
``` ```
@ -60,23 +61,24 @@ To configure it, run `PiGallery2` first to create `config.json` file, then edit
The app has a nice UI for settings, you may use that too. The app has a nice UI for settings, you may use that too.
Default user: `admin` pass: `admin` Default user: `admin` pass: `admin`
### Run with Docker ### 1.2 Run with Docker
If you have `docker` and don't want to install all the dependencies, use this:
```bash ```bash
docker run \ docker run \
-p 80:80 \ -p 80:80 \
-e NODE_ENV=production \ -e NODE_ENV=production \
-v <path to your config file folder>/config.json:/pigallery2-release/config.json \ -v <path to your config file folder>/config.json:/pigallery2-release/config.json \
-v <path to your images folder>:/pigallery2-release/demo/images \ -v <path to your images folder>:/pigallery2-release/demo/images \
-v <path to your temp folder>:/pigallery2-release/TEMP \ -v <path to your temp folder>:/pigallery2-release/demo/TEMP \
bpatrik/pigallery2:nightly-stretch bpatrik/pigallery2:nightly-stretch
``` ```
Make sure that a file at `<path to your config file folder>/config.json` exists before running it. Make sure that a file at `<path to your config file folder>/config.json` exists before running it.
After the container is up and running, you go to `http://localhost` and log in with user: `admin` pass: `admin` and set up the page in the settings. After the container is up and running, you go to `http://localhost` and log in with user: `admin` pass: `admin` and set up the page in the settings.
**Note**: of course, you dont need to do installation steps if you are using docker. **Note**: You dont need to do the installation steps if you are using docker.
### Useful links/tips: ### 1.3 Useful links/tips:
#### using nginx #### using nginx
https://stackoverflow.com/questions/5009324/node-js-nginx-what-now https://stackoverflow.com/questions/5009324/node-js-nginx-what-now
@ -91,7 +93,7 @@ apt-get install build-essential libkrb5-dev gcc g++
``` ```
## Translate the page to your own language ## 2. Translate the page to your own language
1. download / clone the repo (the source not the packed release!) 1. download / clone the repo (the source not the packed release!)
2. add your language e.g: fr 2. add your language e.g: fr
```bash ```bash
@ -110,7 +112,7 @@ apt-get install build-essential libkrb5-dev gcc g++
## Feature list ## 3. Feature list
* **Rendering directories as it is** * **Rendering directories as it is**
* Listing subdirectories recursively * Listing subdirectories recursively
@ -151,17 +153,18 @@ apt-get install build-essential libkrb5-dev gcc g++
* video support * video support
* fully supports *.mp4 files and partially (might have errors with safari and IE) supports *.ogg, *.ogv, *.webm files * fully supports *.mp4 files and partially (might have errors with safari and IE) supports *.ogg, *.ogv, *.webm files
* uses ffmpeg and ffprobe to generate video thumbnails * uses ffmpeg and ffprobe to generate video thumbnails
* Dockerized
* **Markdown based blogging support** - `future plan` * **Markdown based blogging support** - `future plan`
* you can write some note in the blog.md for every directory * you can write some note in the blog.md for every directory
* bug free :) - `In progress` * bug free :) - `In progress`
## Known errors ## 4. Known errors
* EXIF orientation tag: * EXIF orientation tag:
* There is no nice way to handle EXIF orientation tag properly. * There is no nice way to handle EXIF orientation tag properly.
The page handles these photos, but might cause same error in the user experience (e.g.: the pages loads those photos slower. See issue [#11](https://github.com/bpatrik/pigallery2/issues/11)) The page handles these photos, but might cause same error in the user experience (e.g.: the pages loads those photos slower. See issue [#11](https://github.com/bpatrik/pigallery2/issues/11))
* Video support on weak servers (like raspberry pi) with low upload rate * Video support on weak servers (like raspberry pi) with low upload rate
* video playback may use up too much resources and the server might not response for a while. A solution might be to down scale / convert the video files to lower bitrate. * video playback may use up too much resources and the server might not response for a while. A solution might be to down scale / convert the video files to lower bitrate.
## Credits ## 5. Credits
Crossbrowser testing sponsored by [Browser Stack](https://www.browserstack.com) Crossbrowser testing sponsored by [Browser Stack](https://www.browserstack.com)
[<img src="https://camo.githubusercontent.com/a7b268f2785656ab3ca7b1cbb1633ee5affceb8f/68747470733a2f2f64677a6f7139623561736a67312e636c6f756466726f6e742e6e65742f70726f64756374696f6e2f696d616765732f6c61796f75742f6c6f676f2d6865616465722e706e67" alt="Browser Stack" height="31px" style="background: cornflowerblue;">](https://www.browserstack.com) [<img src="https://camo.githubusercontent.com/a7b268f2785656ab3ca7b1cbb1633ee5affceb8f/68747470733a2f2f64677a6f7139623561736a67312e636c6f756466726f6e742e6e65742f70726f64756374696f6e2f696d616765732f6c61796f75742f6c6f676f2d6865616465722e706e67" alt="Browser Stack" height="31px" style="background: cornflowerblue;">](https://www.browserstack.com)