Skip to content

Commit

Permalink
feat: add Dockerfile to this project (#173)
Browse files Browse the repository at this point in the history
Inspired by https://github.com/cheminfo/rest-on-couch-docker
Then we can archive that repo and don't need another step to publish the Docker image.
  • Loading branch information
targos authored Nov 2, 2018
1 parent 2d17b31 commit cb4b560
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
conf
coverage
docs
node_modules
public/bundle*
test
tools
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:10 as builder

WORKDIR /rest-on-couch-source
COPY ./ ./

RUN npm ci && npm run build && rm -rf node_modules

FROM node:10

ENV NODE_ENV production
ENV REST_ON_COUCH_HOME_DIR /rest-on-couch

WORKDIR /rest-on-couch-source
COPY --from=builder /rest-on-couch-source /rest-on-couch-source
RUN npm install -g pm2 && npm ci && rm -rf /root/.npm

CMD ["node", "bin/rest-on-couch-server.js"]

0 comments on commit cb4b560

Please sign in to comment.