From 2cee1fe944d0a4b2b343ea77af70b8c468ef7d8c Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Wed, 5 Dec 2018 23:16:14 +0100 Subject: [PATCH] adding docker support --- README.md | 16 ++++++++++++++++ docker/ubuntu/16/Dockerfile | 22 ---------------------- 2 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 docker/ubuntu/16/Dockerfile diff --git a/README.md b/README.md index 93c516cb..e40eddde 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,22 @@ 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. Default user: `admin` pass: `admin` +### Run with Docker +```bash +docker run \ + -p 80:80 \ + -e NODE_ENV=production \ + -v /config.json:/pigallery2-release/config.json \ + -v :/pigallery2-release/demo/images \ + -v :/pigallery2-release/TEMP \ + bpatrik/pigallery2:nightly-stretch +``` +Make sure that a file at `/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. + +**Note**: of course, you dont need to do installation steps if you are using docker. + ### Useful links/tips: #### using nginx diff --git a/docker/ubuntu/16/Dockerfile b/docker/ubuntu/16/Dockerfile deleted file mode 100644 index 64a227e4..00000000 --- a/docker/ubuntu/16/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -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 -