Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker functionality for development
- Add a Dockerfile - Add a docker-compose.yml with configuration files - Add sleep method for waiting until mongodb is ready - Link current sources into container for live edit capability
- Loading branch information
1 parent
f5056d4
commit 75b937d
Showing
5 changed files
with
66 additions
and
3 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,2 @@ | ||
node_modules | ||
npm-debug.log |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
node_modules | ||
standard.pem | ||
stdEU.pem | ||
|
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,15 @@ | ||
FROM node:boron | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# Install app dependencies | ||
COPY package.json /usr/src/app/ | ||
RUN npm install | ||
|
||
# Bundle app source | ||
COPY . /usr/src/app | ||
|
||
EXPOSE 8080 | ||
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,29 @@ | ||
version: '2.0' | ||
|
||
services: | ||
mongo: | ||
image: 'mongo:3.4.4' | ||
ports: | ||
- '127.0.0.1:27017:27017' | ||
volumes: | ||
- 'mongo:/data/db' | ||
|
||
browserquest: | ||
tty: true | ||
stdin_open: true | ||
depends_on: | ||
- mongo | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
command: node server.js -p 80 --mongoServer mongo --waitForDatabase 5000 | ||
ports: | ||
- '80:80' | ||
volumes: | ||
- './assets:/usr/src/app/assets' | ||
- './js:/usr/src/app/js' | ||
- './server.js:/usr/src/app/server.js' | ||
- './package.json:/usr/src/app/package.json' | ||
- './index.html:/usr/src/app/index.html' | ||
volumes: | ||
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