From 49f9749e6ad0d87ed56bfeb0354d6c7a6b45e5d9 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Wed, 5 Dec 2018 21:55:11 +0100 Subject: [PATCH] adding docker files --- README.md | 6 ++++-- docker/debian/stretch/Dockerfile | 17 +++++++++++++++++ docker/ubuntu/16/Dockerfile | 22 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 docker/debian/stretch/Dockerfile create mode 100644 docker/ubuntu/16/Dockerfile diff --git a/README.md b/README.md index 1645ab9..93c516c 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,14 @@ unzip master.zip cd pigallery2-master # enter the unzipped directory 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. ### Run PiGallery2 ```bash npm start ``` -To configure it. Run `PiGallery2` first to create `config.json` file, then edit it and restart. +To configure it, run `PiGallery2` first to create `config.json` file, then edit it and restart. +The app has a nice UI for settings, you may use that too. Default user: `admin` pass: `admin` ### Useful links/tips: @@ -103,7 +105,7 @@ apt-get install build-essential libkrb5-dev gcc g++ * **On the fly thumbnail generation** in several sizes * prioritizes thumbnail generation (generating thumbnail first for the visible photos) * saving generated thumbnails to TEMP folder for reuse - * supporting several core CPU + * supporting multi-core CPUs * supporting hardware acceleration ([sharp](https://github.com/lovell/sharp) and [gm](https://github.com/aheckmann/gm) as optional and JS-based [Jimp](https://github.com/oliver-moran/jimp) as fallback) * Custom lightbox for full screen photo viewing * keyboard support for navigation diff --git a/docker/debian/stretch/Dockerfile b/docker/debian/stretch/Dockerfile new file mode 100644 index 0000000..b921c9e --- /dev/null +++ b/docker/debian/stretch/Dockerfile @@ -0,0 +1,17 @@ +FROM node:10-stretch +MAINTAINER Patrik J. Braun + + +RUN git clone https://github.com/bpatrik/pigallery2.git && \ + cd /pigallery2 && \ + npm install --unsafe-perm && \ + npm run build-release + +RUN cp -r /pigallery2/release /pigallery2-release && \ + rm /pigallery2 -R + +RUN cd /pigallery2-release && \ + npm install --unsafe-perm + +cmd cd /pigallery2-release && npm start + diff --git a/docker/ubuntu/16/Dockerfile b/docker/ubuntu/16/Dockerfile new file mode 100644 index 0000000..64a227e --- /dev/null +++ b/docker/ubuntu/16/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:16.04 +MAINTAINER Patrik J. Braun + +RUN apt-get update && \ + apt-get install -y curl git +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ + apt-get install -y nodejs && \ + apt-get install -y build-essential + +RUN git clone https://github.com/bpatrik/pigallery2.git && \ + cd /pigallery2 && \ + npm install --unsafe-perm && \ + npm run build-release + +RUN cp -r /pigallery2/release /pigallery2-release && \ + rm /pigallery2 -R + +RUN cd /pigallery2-release && \ + npm install --unsafe-perm + +cmd cd /pigallery2-release && npm start +