Skip to content

Commit

Permalink
Docker image for web app.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmjennison committed Feb 4, 2017
1 parent 2460b64 commit ba8a14b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.DS_Store
npm-debug.log
.env
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

version: '2'
services:
web:
restart: always
build:
context: ./web/
ports:
- "80:3000"
volumes:
- ./web:/web
- ./web/node_modules:/web/node_modules # http://stackoverflow.com/a/32785014/1332513
command: ["npm", "start"]
1 change: 1 addition & 0 deletions web/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/*
15 changes: 15 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:6.9

# Make our app directories.
RUN mkdir /web
WORKDIR /web

# Install Node modules.
ADD package.json package.json
RUN npm install

# Copy our app.
ADD ./ /web
EXPOSE 3000

CMD npm run start

0 comments on commit ba8a14b

Please sign in to comment.