-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from energywebfoundation/master
Release
- Loading branch information
Showing
266 changed files
with
8,633 additions
and
6,384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
doc/architecture/decisions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
# ------- NEEDED --------- # | ||
MODE="production" | ||
# ------- REQUIRED --------- # | ||
MODE=production | ||
|
||
# URLs | ||
WEB3="http://localhost:8545" | ||
BACKEND_URL="http://localhost:3030" | ||
WEB3=http://localhost:8545 | ||
BACKEND_URL=http://localhost:3030 | ||
BACKEND_PORT=3030 | ||
UI_BASE_URL="http://localhost:3000" | ||
ENERGY_API_BASE_URL="http://localhost:3031" | ||
BLOCKCHAIN_EXPLORER_URL="https://volta-explorer.energyweb.org" | ||
UI_BASE_URL=http://localhost:3000 | ||
ENERGY_API_BASE_URL=http://localhost:3031 | ||
BLOCKCHAIN_EXPLORER_URL=https://volta-explorer.energyweb.org | ||
|
||
# Secret keys | ||
DEPLOY_KEY="d9066ff9f753a1898709b568119055660a77d9aae4d7a4ad677b8fb3d2a571e5" | ||
MATCHER_PRIV_KEY="0xe9a63e116f72c2e368376eb88c22fecf2a5e94a93464ff8802cf97caac657548" | ||
DEPLOY_KEY=d9066ff9f753a1898709b568119055660a77d9aae4d7a4ad677b8fb3d2a571e5 | ||
MATCHER_PRIV_KEY=0xe9a63e116f72c2e368376eb88c22fecf2a5e94a93464ff8802cf97caac657548 | ||
MATCHER_INTERVAL=15 | ||
EVENT_LISTENER_PRIV_KEY=0x968cc146af9c9d3ac08cca0dd3f915ed5a0966c118e26fd5e99066b0ff8bc060 | ||
|
||
# ORIGIN_BACKEND (optional) | ||
ORM_TYPE=sqlite | ||
ORM_DATABASE_DOCKER=FALSE | ||
|
||
# ------- OPTIONAL ------- # | ||
MANDRILL_API_KEY="<API_KEY>" | ||
EMAIL_FROM="[email protected]" | ||
EMAIL_REPLY_TO="[email protected]" | ||
MANDRILL_API_KEY=<API_KEY> | ||
EMAIL_FROM=[email protected] | ||
EMAIL_REPLY_TO=[email protected] | ||
|
||
SOLAR_SIMULATOR_DEPLOY_PAST_READINGS=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
doc/architecture/decisions/0001-record-architecture-decisions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 1. Record architecture decisions | ||
|
||
Date: 2019-11-11 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
We need to record the architectural decisions made on this project. | ||
|
||
## Decision | ||
|
||
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). | ||
|
||
## Consequences | ||
|
||
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). |
19 changes: 19 additions & 0 deletions
19
doc/architecture/decisions/0002-use-lerna-for-package-versioning.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 2. Use lerna for package versioning | ||
|
||
Date: 2019-11-11 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Origin project consist of multiple packages which are the part of Origin SDK. Complex dependency graph forces us to update dependent packages manually every time dependency has changed. | ||
|
||
## Decision | ||
|
||
Migrate code base to monorepo structure and use `lerna` for versioning management. | ||
|
||
## Consequences | ||
|
||
All packages will be migrated to single GIT repository. Development will be based on that repo. |
20 changes: 20 additions & 0 deletions
20
doc/architecture/decisions/0003-create-backend-client-lib.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 3. create backend client lib | ||
|
||
Date: 2019-11-11 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Off-chain data is accessible via REST API. Currently all system components uses direct REST calls in various places making unit test hard. | ||
|
||
## Decision | ||
|
||
Create client library and use it as dependency in components that want to read the off-chain data. Include the mocked version of the service so unit-tests does not have to rely on the implementation. | ||
|
||
## Consequences | ||
|
||
Client will be added as separate package, tests will utilise mocked version. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 4. Use OpenZeppelin | ||
|
||
Date: 2019-11-11 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Origin SDK contracts are designed to be upgradable by abstracting proxy, logic and storage to separate contracts. This approach leads to maintaining 3 separate Solidity files per contract. | ||
|
||
## Decision | ||
|
||
Use OpenZeppelin implementation based on generalized proxy, logic and storage to remove the need of keeping 3 separate custom implemented contracts. | ||
|
||
## Consequences | ||
|
||
Improves security by delegating part of the functionality to community standard libraries. Allows us to use OpenZeppelin cli tools for deployment and migrations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: '3' | ||
services: | ||
origin_ui: | ||
image: "energyweb/origin-ui:${TAG}" | ||
ports: | ||
- "80:80" | ||
networks: | ||
- app-network | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- origin_backend | ||
|
||
market_matcher: | ||
image: "energyweb/market-matcher:${TAG}" | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- origin_backend | ||
|
||
event_listener: | ||
image: "energyweb/event-listener:${TAG}" | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- origin_backend | ||
|
||
solar_simulator: | ||
image: "energyweb/solar-simulator:${TAG}" | ||
ports: | ||
- "3031:3031" | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- origin_backend | ||
networks: | ||
- app-network | ||
|
||
origin_backend: | ||
image: "energyweb/origin-backend:${TAG}" | ||
ports: | ||
- "${BACKEND_PORT}:${BACKEND_PORT}" | ||
networks: | ||
- app-network | ||
env_file: | ||
- ./.env | ||
volumes: | ||
- "./db:/var/db" | ||
|
||
networks: | ||
app-network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,16 @@ | ||
version: '3' | ||
services: | ||
origin_ui: | ||
image: "energyweb/origin-ui:${TAG}" | ||
ports: | ||
- "80:80" | ||
networks: | ||
- app-network | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- origin_backend | ||
|
||
market_matcher: | ||
image: "energyweb/market-matcher:${TAG}" | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- origin_backend | ||
|
||
origin_backend: | ||
image: "energyweb/origin-backend:${TAG}" | ||
nginx: | ||
image: nginx:alpine | ||
restart: unless-stopped | ||
tty: true | ||
ports: | ||
- "${BACKEND_PORT}:${BACKEND_PORT}" | ||
- "80:80" | ||
volumes: | ||
- ./packages/origin-ui/dist:/var/www/html | ||
- ./packages/origin-ui/nginx/default.conf:/etc/nginx/conf.d/default.conf | ||
networks: | ||
- app-network | ||
env_file: | ||
- ./.env | ||
volumes: | ||
- "./db.sqlite:/var/db/db.sqlite" | ||
|
||
networks: | ||
app-network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
touch db.sqlite | ||
mkdir -p db | ||
docker-compose pull | ||
docker-compose up | ||
docker-compose up -d |
Oops, something went wrong.