README.md 1.22 KB
Newer Older
Erik Jansen's avatar
Erik Jansen committed
1
# Building a docker image for system / masternodes
vagrant's avatar
vagrant committed
2

Erik Jansen's avatar
Erik Jansen committed
3
Check the hosted image at docker hub: https://hub.docker.com/r/crownplatform/node/
Erik Jansen's avatar
Erik Jansen committed
4
5
6
7
8
9
10
11

## Requirements

- Real machine, or VPS that supports Docker running Ubuntu 16.04
- At least 1 GB RAM + 1 GB swap file

## Quickstart

12
### Step 1 - create a volume
Erik Jansen's avatar
Erik Jansen committed
13
The volume will save your configuration and the blockchain even if the docker container gets deleted.
14
15
16
```shell
docker volume create --name=crown-data
```
vagrant's avatar
vagrant committed
17

18
### Step 2 - Start a systemnode
19
```shell
Artem B's avatar
Artem B committed
20
docker run -d -t -p 9340:9340 -p 127.0.0.1:9341:9341 -v crown-data:/crown --name=crown crownplatform/node:v0.12.5.0 -s --privkey=your_private_key_here
21
```
vagrant's avatar
vagrant committed
22

23
or
vagrant's avatar
vagrant committed
24

25
### Step 2 - Start a masternode
26
```shell
Artem B's avatar
Artem B committed
27
docker run -d -t -p 9340:9340 -p 127.0.0.1:9341:9341 -v crown-data:/crown --name=crown crownplatform/node:v0.12.5.0 -m --privkey=your_private_key_here
28
```
Erik Jansen's avatar
Erik Jansen committed
29

Erik Jansen's avatar
Erik Jansen committed
30

31
32
33
34
## Debugging 
```shell
docker exec crown crown-cli systemnode status 
docker exec crown crown-cli getinfo 
Erik Jansen's avatar
Erik Jansen committed
35
36
37
38
39
40
41
42
docker logs crown
``` 

## Upgrade
Upgrade to a new release of crown
```shell
docker pull crownplatform/node:latest
docker stop crown
Erik Jansen's avatar
Erik Jansen committed
43
docker rm crown
Erik Jansen's avatar
Erik Jansen committed
44
docker run -d -t -p 9340:9340 -p 127.0.0.1:9341:9341 -v crown-data:/crown/.crown/ --name=crown crownplatform/node:NEWVERSION_HERE
45
```