Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build/
build-cmakejs/
conan_imports_manifest.txt
conanfile.pyc
conaninfo*
conanbuildinfo*
node_modules/
dist/
joystream.log
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ conanbuildinfo*
node_modules/
dist/
joystream.log
id_rsa
id_rsa.pub
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM ubuntu:16.04

MAINTAINER Lola Rigaut-Luczak <rllola80@gmail.com>

WORKDIR /usr/src/app

RUN apt-get update

RUN apt-get -y install g++ cmake git python-pip python-dev curl

RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -

RUN apt-get -y install nodejs build-essential

# Make ssh dir
RUN mkdir /root/.ssh/
# Copy over private key, and set permissions
ADD id_rsa /root/.ssh/id_rsa
# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add bitbuckets key
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts

RUN pip install --upgrade pip
RUN pip install conan
RUN conan remote add joystream https://conan.joystream.co:9300 True
RUN conan user travis -p trav444 -r=joystream

COPY . .

RUN npm install -g node-gyp

RUN npm install
RUN npm run transpile
RUN node-gyp rebuild

EXPOSE 6881

CMD [ "npm", "run", "purchase" ]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@ building for electron for example:
```
$ node-gyp rebuild --target=1.6.2 --arch=x64 --dist-url=https://atom.io/download/electron
```

## Docker

You will need to generate a ssh key and to add it to your github in order to be able to pull the dependencies libraries with conan.
Docker will look for a `id_rsa` file to copy in the container.

Build :
```
docker build -t joystream-node .
```

Run container :
```
docker run -d --name joystream-node joystream-node
```

Notes: You might need a server with 4GB ram so it can build.