Skip to content

Commit

Permalink
Add Docker Support (#74)
Browse files Browse the repository at this point in the history
* add Dockerfile for make-sense

* Update README for Docker

* README updated

* README updated with docker logs

* readme updated
  • Loading branch information
fatihbaltaci authored and SkalskiP committed Oct 8, 2019
1 parent 2b93a7d commit 1af7c96
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,34 @@ npm start
```
To ensure proper functionality of the application locally, an npm `6.x.x` and node.js `v11.x.x` versions are required. More information about this problem is available in the [#16][4].

## Set Up Project with Docker

### Build Docker Image

```bash
docker build -t make_sense docker/
```

### Run Docker Image as Service

```bash
docker run -dit -p 3000:3000 --restart=always --name=make_sense make_sense
```

### Get Docker Container IP

```bash
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' make_sense
```

- Go to `<DOCKER_CONTAINER_IP>:3000`

### Get Docker Container Logs

```bash
docker logs make_sense
```

## Supported Keyboard Shortcuts

| Functionality | Context | Mac | Windows / Linux |
Expand Down
9 changes: 9 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:11.10-slim

RUN apt-get update && apt-get -y install git && rm -rf /var/lib/apt/lists/*

RUN mkdir /workspace && cd /workspace && git clone https://github.com/SkalskiP/make-sense.git && cd make-sense && npm install

WORKDIR /workspace/make-sense

ENTRYPOINT ["npm", "start"]

0 comments on commit 1af7c96

Please # to comment.