Skip to content

Commit

Permalink
run with docker options.
Browse files Browse the repository at this point in the history
Signed-off-by: Yefu Wang <m@yefu.org>
  • Loading branch information
yefuwang committed Feb 5, 2019
1 parent 3dd36c3 commit 164c174
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:10.15.1-alpine
COPY . /src
WORKDIR /src
RUN npm install --production
ENTRYPOINT ["node", "docker_entry.js"]


15 changes: 15 additions & 0 deletions docker_entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

const imageBuf = require('./lib/imageBuf');

let options = {
remotePath: process.env.REMOVE_PATH,
portNumber: process.env.PORT_NUMBER,
memoryCacheSize: process.env.MEMORY_CACHE_SIZE,
localFolder:process.env.LOCAL_FOLDER,
logFile:process.env.LOG_FILE,
resizeWidth:process.env.RESIZE_WIDTH,
resizeHeight:process.env.RESIZE_WIDTH
};


var server = new imageBuf (options);

0 comments on commit 164c174

Please sign in to comment.