-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for running in Docker
Add .dockerignore file Add Dockerfile-dev for faster dev builds Add docker-compose.yml with common commands Expose app to 0.0.0.0 instead of localhost Bump version to 1.3.0
- Loading branch information
Showing
6 changed files
with
48 additions
and
2 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,7 @@ | ||
.git | ||
.gitignore | ||
.editorconfig | ||
node_modules | ||
*.log | ||
*.md | ||
|
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,20 @@ | ||
FROM node:0.12 | ||
MAINTAINER tribou | ||
|
||
# Prepare app directory | ||
RUN mkdir -p /usr/src/app | ||
ADD . /usr/src/app | ||
|
||
# Install dependencies | ||
WORKDIR /usr/src/app | ||
RUN npm install | ||
|
||
# Build the app | ||
RUN npm build | ||
|
||
# Expose the app port | ||
EXPOSE 8000 | ||
|
||
# Start the app | ||
CMD npm start | ||
|
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,6 @@ | ||
FROM todo | ||
|
||
ADD . /usr/src/app | ||
RUN npm build | ||
CMD npm start | ||
|
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,13 @@ | ||
web: | ||
build: . | ||
dockerfile: Dockerfile-dev | ||
links: | ||
- db | ||
environment: | ||
- DB_HOST=db | ||
ports: | ||
- '8000:8000' | ||
command: npm start | ||
db: | ||
image: mongo | ||
|
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
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