1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

adding docker support

This commit is contained in:
Patrik J. Braun 2018-12-05 23:16:14 +01:00
parent 49f9749e6a
commit 2cee1fe944
2 changed files with 16 additions and 22 deletions

View File

@ -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. 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
```bash
docker run \
-p 80:80 \
-e NODE_ENV=production \
-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 temp folder>:/pigallery2-release/TEMP \
bpatrik/pigallery2:nightly-stretch
```
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.
**Note**: of course, you dont need to do installation steps if you are using docker.
### Useful links/tips: ### Useful links/tips:
#### using nginx #### using nginx

View File

@ -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