-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Dockerfiles for client/server. #209
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |