Skip to content

Commit

Permalink
Merge pull request #199 from oceanprotocol/feature/docker-update
Browse files Browse the repository at this point in the history
Dockerfile updates
  • Loading branch information
Ahmed authored Sep 16, 2020
2 parents 5949617 + d1aa68f commit 0a99d93
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 42 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
language: node_js

node_js:
- "10"
- "12"

dist: xenial

sudo: required

cache:
directories:
- node_modules
cache: npm

env:
- DEPLOY_PACKAGE=true

before_install:
- npm install -g npm
- npm install -g ganache-cli@~6.4.1
- npm i
- |
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10-alpine
FROM node:12-alpine
LABEL maintainer="Ocean Protocol <devops@oceanprotocol.com>"

RUN apk add --no-cache --update\
Expand All @@ -15,7 +15,6 @@ RUN apk add --no-cache --update\
COPY . /ocean-contracts
WORKDIR /ocean-contracts

RUN npm install -g npm
RUN npm install
RUN npm install --no-optional && npm cache clean --force

ENTRYPOINT ["/ocean-contracts/scripts/deploy_docker.sh"]
66 changes: 34 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
[![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://oceanprotocol.com)

<h1 align="center">Ocean Protocol Contracts</h1>

> 🐙 Smart contracts for Ocean Protocol v3
[![Build Status](https://travis-ci.com/oceanprotocol/ocean-contracts.svg?token=soMi2nNfCZq19zS1Rx4i&branch=master)](https://travis-ci.com/oceanprotocol/ocean-contracts)
[![codecov](https://codecov.io/gh/oceanprotocol/contracts/branch/master/graph/badge.svg?token=31SZX1V4ZJ)](https://codecov.io/gh/oceanprotocol/contracts)

# Ocean Protocol Contracts
---

**This is in alpha state and you can expect running into problems. If you run into them, please open up a [new issue](/issues).**

This is in alpha state and you can expect running into problems. If you run into them, please open up a [new issue](/issues).
---

A high level overview of OceanProtocol contracts:

![image](https://user-images.githubusercontent.com/5428661/92893688-31cbfa80-f41a-11ea-845c-2c94ecc978f1.png)



## Table of Contents
**Table of Contents**

- [Get Started](#get-started)
- [Installation](#installation)
- [Usage](#usage)
- [Local development](#local-development)
- [Testing](#testing)
- [Code Linting](#code-linting)
- [Networks](#networks)
- [Packages](#packages)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Prior Art](#prior-art)
- [License](#license)
- [Get Started](#get-started)
- [Usage](#usage)
- [Local development](#local-development)
- [Testing](#testing)
- [Code Linting](#code-linting)
- [Networks](#networks)
- [Testnets](#testnets)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Prior Art](#prior-art)
- [License](#license)

# Get Started
## Get Started

### Installation

For quick installation of the contracts `ABIs`:
For quick installation of the contract `ABIs`:

```bash
npm i @oceanprotocol/contracts
```

### Usage
For more details about how to use ocean contracts, please refer to the quick start section in [ocean-lib-js](https://github.com/oceanprotocol/ocean-lib-js#-quick-start) and [ocean-lib-py](https://github.com/oceanprotocol/ocean-lib-py#quickstart).

Expand All @@ -46,16 +50,14 @@ For local development of the `contracts` setup the development environment on yo

As a pre-requisite, you need:

- Node.js
- Node.js v12+
- npm

Note: For MacOS, make sure to have `node@10` installed.

Clone the project and install all dependencies:

```bash
git clone git@github.com:oceanprotocol/contracts.git
cd contracts/
git clone git@github.com:oceanprotocol/ocean-contracts.git
cd ocean-contracts/

# install packages
npm i
Expand All @@ -64,7 +66,7 @@ npm i
npm run compile
```

# Testing
## Testing

Run tests with

Expand All @@ -76,35 +78,36 @@ npm run test:unit
npm run test:cover
```

### Code Linting
## Code Linting

Linting is setup for `JavaScript` with [ESLint](https://eslint.org) & Solidity with [Ethlint](https://github.com/duaraghav8/Ethlint).

```bash
# to check lint issues
npm run lint
```

Code style is enforced through the CI test process, builds will fail if there're any linting errors.

# Networks
## Networks

### Testnets

For local development, start a local testnet using `ganache-cli`, then run:

```
```bash
npm run deploy
```
Checkout the supported deployment(s) on test [networks](docs/README.md#deployments).
Checkout the supported deployment(s) on these [networks](docs/README.md#deployments).

## Documentation

To use generate documentation via `solidity-docgen` please run:

```bash
npm run doc:generate
```


* [Release Process](docs/RELEASE_PROCESS.md)
* [Core Documentation](docs/contracts)

Expand All @@ -113,7 +116,6 @@ npm run doc:generate
See the page titled "[Ways to Contribute](https://docs.oceanprotocol.com/concepts/contributing/)" in the Ocean Protocol documentation.



## Prior Art

This project builds on top of the work done in open source projects:
Expand All @@ -122,7 +124,7 @@ This project builds on top of the work done in open source projects:
## License

```
Copyright 2018 Ocean Protocol Foundation
Copyright 2020 Ocean Protocol Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions docs/RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Releases

Releases are managed manually. They are always manually triggered from a developer's machine with release scripts for
both python and javascript packages:
Releases are managed manually. They are always manually triggered from a developer's machine with release scripts for both python and javascript packages:

## Production

Expand Down

0 comments on commit 0a99d93

Please sign in to comment.