10000 Add dockerfile for production · TailorDev/assignees@7b9f1e9 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Add dockerfile for production
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Jul 24, 2017
1 parent 203537f commit 7b9f1e9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:7.4-alpine
FROM node:8.1

ENV APP_DIR=/usr/src/app

Expand All @@ -14,4 +14,6 @@ ENV NODE_PATH=/usr/src/node_modules
ENV PATH="$PATH:/usr/src/node_modules/.bin"
WORKDIR $APP_DIR

COPY . $APP_DIR

CMD [ "nodemon", "--exec", "yarn", "run", "start" ]
17 changes: 17 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:7.4-alpine

ENV APP_DIR=/usr/src/app

RUN npm install -g nodemon yarn

RUN mkdir -p $APP_DIR

COPY package.json yarn.lock /usr/src/
WORKDIR /usr/src
RUN yarn install

ENV NODE_PATH=/usr/src/node_modules
ENV PATH="$PATH:/usr/src/node_modules/.bin"
WORKDIR $APP_DIR

CMD [ "nodemon", "--exec", "yarn", "run", "start" ]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
app:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- 3000:3000
volumes:
Expand Down

0 comments on commit 7b9f1e9

Please sign in to comment.
0