Skip to content

Commit

Permalink
Merge pull request #1324 from DemocracyOS/update/docker
Browse files Browse the repository at this point in the history
Update dockerfiles
  • Loading branch information
gvilarino authored Oct 24, 2016
2 parents 96e2ee3 + c2fa698 commit 2240dbb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docker/development.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
FROM node:argon

MAINTAINER Guido Vilariño <guido@democracyos.org>

RUN apt-get update && \
apt-get install -y libkrb5-dev && \
npm config set python python2.7
RUN npm config set python python2.7

COPY package.json /usr/src/
COPY ["package.json", "/usr/src/"]

WORKDIR /usr/src

RUN npm install --quiet --unsafe-perm
RUN npm install --quiet --production

RUN npm install --quiet --only=development

COPY [".", "/usr/src/"]

EXPOSE 3000

ENV NODE_PATH=.

CMD ["./node_modules/.bin/gulp", "bws"]
22 changes: 22 additions & 0 deletions docker/production.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:argon

MAINTAINER Guido Vilariño <guido@democracyos.org>

RUN npm config set python python2.7

COPY ["package.json", "/usr/src/"]

WORKDIR /usr/src

RUN npm install --quiet --production

COPY [".", "/usr/src/"]

RUN npm run build -- --minify

ENV NODE_ENV=production \
NODE_PATH=.

EXPOSE 3000

CMD ["node", "index.js"]

0 comments on commit 2240dbb

Please sign in to comment.