Skip to content

Commit

Permalink
Adding Dockerfiles for client/server. #209
Browse files Browse the repository at this point in the history
  • Loading branch information
killerbgt committed Jun 26, 2015
1 parent a7b81bc commit 4b73cfd
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
35 changes: 35 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM node:0.12.5
MAINTAINER 540 Co LLC <[email protected]>

RUN mkdir -p /usr/src/dre
WORKDIR /usr/src/dre

RUN npm install -g bower grunt-cli

RUN groupadd -r node \
&& useradd -r -m -g node node

# Copy source
COPY . /usr/src/dre
RUN chown -R node:node /usr/src/dre

USER node

# Install dependencies
RUN npm install; bower install

# Expose port 9000 to host
EXPOSE 9000

# Serve App
CMD ["grunt", "serve"]

# How to build:
# git clone https://github.com/540co/ads-bpa.git
# cd ads-bpa/client
# docker build -t dre .

# How to run
# docker pull mongo
# docker run -d --name db mongo
# docker run -d --name dre -p 3000:3000 --link db:db dre
33 changes: 33 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM node:0.12.5
MAINTAINER 540 Co LLC <[email protected]>

RUN mkdir -p /usr/src/dre
WORKDIR /usr/src/dre

RUN groupadd -r node \
&& useradd -r -m -g node node

# Copy source
COPY . /usr/src/dre
RUN chown -R node:node /usr/src/dre

USER node

# Install server dependencies
RUN npm install

# Expose port 3000 to host
EXPOSE 3000

# Start server
CMD ["npm", "start"]

# How to build:
# git clone https://github.com/540co/ads-bpa.git
# cd ads-bpa/server
# docker build -t dre-backend .

# How to run
# docker pull mongo
# docker run -d --name db mongo
# docker run -d --name dre -p 3000:3000 --link db:db dre

0 comments on commit 4b73cfd

Please sign in to comment.