Skip to content

Commit

Permalink
Add docker and makefile (#21)
Browse files Browse the repository at this point in the history
* add Dockerfile and Makefile

* update readme
  • Loading branch information
sunny-b committed Jul 3, 2019
1 parent 85a1e84 commit 734b6f9
Show file tree
Hide file tree
Showing 6 changed files with 1,894 additions and 1,474 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
12 changes: 12 additions & 0 deletions Dockerfile
@@ -0,0 +1,12 @@
FROM node:8

WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install

COPY . .

RUN npm run build && npm run compile

EXPOSE 3000

8 changes: 8 additions & 0 deletions Makefile
@@ -0,0 +1,8 @@
build-image:
docker build -t conclave .

run-local: build-image server

server:
docker run --rm -p 3000:3000 conclave npm start

24 changes: 24 additions & 0 deletions README.md
Expand Up @@ -15,3 +15,27 @@ Conclave is an open-source, real-time, collaborative text editor for the browser
Intrigued by collaboration tools like Google Docs, we set out to build one from scratch. Conclave uses **Conflict-Free Replicated Data Types** (CRDT) to make sure all users stay in-sync and **WebRTC** to allow users to send messages directly to one another. The result is a private and decentralized way to collaborate on documents.

For more details on how we designed and built Conclave, read our [case study](https://conclave-team.github.io/conclave-site/).

# How to Run Locally

You will need node and npm. First download the dependencies.

```
npm install
```

Next, you will need to build and compile the assets and start the server. You can do that all in an npm command.

```
npm run local
```

We've added a Makefile and Dockerfile to make this easier. I highly recommend using them.

Simply run:

```
make run-local
```

And you will be good to go.

0 comments on commit 734b6f9

Please sign in to comment.