Skip to content

Commit

Permalink
feat: added basic Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
idoo committed Jul 18, 2019
1 parent 0191bde commit ae84b7b
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
LICENSE
.vscode
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:10-alpine

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
COPY package*.json ./
RUN yarn install

# Bundle app source
COPY . .

EXPOSE 2018 3018 8888 9229
CMD [ "yarn", "start" ]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<span> · </span>
<a href="#case-studies">Case studies</a>
<span> · </span>
<a href="#docker">Docker<a>
<span> · </span>
<a href="#support">Support</a>
</h3>

Expand Down Expand Up @@ -137,6 +139,12 @@ The tool (codecrumbs) allows us to learn, document and explain a codebase much f

The ultimate goal is to have many case studies hosting at [https://codecrumbs.io](https://codecrumbs.io/). **The library of projects "explained with codecrumbs", the place for collaborative learning**. More features around that coming soon, stay tuned.

## Docker
To start dockerise application run
`docker build -t codecrumbs .`
and once docker image will be build successfully
`docker run -p 2018:2018 -d codecrumbs`

## Support
Any support is very much appreciated! 👍 😘 ❤️
If you like this project, please, **put a :star: and tweet about it**. Thanks!
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

services:
codecrumbs:
build: .
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- 2018:2018
- 3018:3018
- 9229:9229
- 8888:8888
command: yarn start
2 changes: 1 addition & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const setup = (options, devOptions) => {
} = options;

const PORT_IN_USE = 'open';
const HOST = '127.0.0.1';
const HOST = '0.0.0.0';

validateProjectPath(projectDir, entryPoint);

Expand Down

0 comments on commit ae84b7b

Please sign in to comment.