Skip to content

Commit

Permalink
Merge pull request #563 from cosmos/Docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
nylira authored Apr 4, 2018
2 parents e8762a4 + 4f23fdc commit 08d008a
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 1,693 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- node_modules
key: v1-dependencies-root-{{ checksum "package.json" }}

- run:
- run:
name: Add Gaia
command: |
sudo wget https://www.dropbox.com/s/vkyuut8hnzse614/gaia-0.5.0-linux-32?dl=1 -O ~/repo/gaia
sudo wget https://tendermint-packages.interblock.io/binaries/gaia_linux_amd64/gaia_decb23bed0179244e4f42d697dcd4bf759200a2d -O ~/repo/gaia
sudo chmod o+wx /home/circleci/repo/gaia
- run: yarn run test
- run: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ coverage
node_modules
npm-debug.log
npm-debug.log.*
/package-lock.json
thumbs.db
!.gitkeep
.vscode/*
app/networks
yarn-error.log
yarn-error.log
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,25 @@ $ COSMOS_NODE=localhost yarn testnet

Get the Gaia binary from [GitHub](`https://github.com/cosmos/gaia/releases`).

Install [Docker](https://docs.docker.com/get-started/).
Building requires that [Docker](https://www.docker.com/get-docker) is installed
on your system.

Build and run the app.
Execute the following command to see building options.

```shell
yarn run build --help
```

Run the app.

```bash
yarn run build --platform={darwin|win32|linux} -- --binary={path to the gaia binary}
open builds/Cosmos-{platform}-x64/Cosmos.app
```

When you are testing the build system you can skip the repackaging of the JS files.

```bash
$ yarn run build --platform={darwin|win32|linux} --skip-pack --binary=...
$ yarn run build --platform=darwin --skip-pack
```

To test if your build worked run:
Expand Down Expand Up @@ -161,17 +167,16 @@ To see the console output of the view in your terminal, set the environment vari

A list of all environment variables and their purpose:

| Variable | Values | default | Purpose |
| ----------------------- | ---------------------------------------- | -------------------------------- | ------------------------------------------------------- |
| NODE_ENV | 'production', 'development' | | |
| LOGGING | 'true', 'false' | 'true' | Disable logging |
| COSMOS_NETWORK | {path to network configuration folder} | '../networks/gaia-1' | Network to connect to |
| COSMOS_HOME | {path to config persistence folder} | '$HOME/voyager[-dev]' | |
| COSMOS_NODE | {ip of a certain node} | | Node to connect to |
| PLATFORM_TARGET | 'all', 'win32', 'darwin', 'linux', 'mas' | 'all' | Which platform to build for |
| COSMOS_DEVTOOLS | 'true', 'false' | 'false' | Open the debug panel in the electron view |
| ELECTRON_ENABLE_LOGGING | 'true', 'false' | 'false' | Redirect the browser view console output to the console |
| PREVIEW | 'true', 'false' | 'true' if NODE_ENV 'development' | Show/Hide features that are in development |
| Variable | Values | default | Purpose |
| ----------------------- | -------------------------------------- | -------------------------------- | ------------------------------------------------------- |
| NODE_ENV | 'production', 'development' | | |
| LOGGING | 'true', 'false' | 'true' | Disable logging |
| COSMOS_NETWORK | {path to network configuration folder} | '../networks/gaia-1' | Network to connect to |
| COSMOS_HOME | {path to config persistence folder} | '$HOME/voyager[-dev]' | |
| COSMOS_NODE | {ip of a certain node} | | Node to connect to |
| COSMOS_DEVTOOLS | 'true', 'false' | 'false' | Open the debug panel in the electron view |
| ELECTRON_ENABLE_LOGGING | 'true', 'false' | 'false' | Redirect the browser view console output to the console |
| PREVIEW | 'true', 'false' | 'true' if NODE_ENV 'development' | Show/Hide features that are in development |

### FAQ

Expand Down
1 change: 0 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ let config = {
ignore: /^\/(src|index\.ejs|icons)/,
out: path.join(__dirname, "builds"),
overwrite: true,
platform: process.env.PLATFORM_TARGET || "darwin,linux,win32",
packageManager: "yarn"
},

Expand Down
Loading

0 comments on commit 08d008a

Please sign in to comment.