Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light Deployment #310

Merged
merged 2 commits into from
Jun 13, 2023
Merged
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
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ Licensed under the GNU GENERAL PUBLIC LICENSE. You may read a copy of the [Licen

## Acknowledgements


Like so many projects, this effort has roots in many places. The list can be found in [ACKNOWLEDGEMENTS](ACKNOWLEDGEMENTS).

## Supported Chains

Ethereum

- mainnet
- sepolia
- goerli

Polygon

- mainnet
- polygon-mumbai
- polygon
- mumbai

145 changes: 145 additions & 0 deletions docker-compose-light.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
# Slim version of the Docker Compose cloud deployment

version: '3.7'

networks:
xes-platform-network:
name: xes-platform-network
reverse-proxy:
name: reverse-proxy
driver: bridge

services:
platform:
image: proxeus/proxeus-core:latest
container_name: xes-platform
depends_on:
- document-service
networks:
- xes-platform-network
- reverse-proxy
restart: unless-stopped
environment:
TZ: Europe/Zurich
PROXEUS_PLATFORM_DOMAIN: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
PROXEUS_DOCUMENT_SERVICE_URL: "http://document-service:2115/"
PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS: "${PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS}"
PROXEUS_INFURA_API_KEY: "${PROXEUS_INFURA_API_KEY}"
PROXEUS_SPARKPOST_API_KEY: "${PROXEUS_SPARKPOST_API_KEY}"
PROXEUS_ENCRYPTION_SECRET_KEY: "${PROXEUS_ENCRYPTION_SECRET_KEY}"
PROXEUS_EMAIL_FROM: "${PROXEUS_EMAIL_FROM:-no-reply@example.com}"
PROXEUS_DATABASE_ENGINE: "${PROXEUS_DATABASE_ENGINE:-storm}"
PROXEUS_DATABASE_URI: "${PROXEUS_DATABASE_URI:-mongodb://root:root@mongo:27017}"
PROXEUS_TEST_MODE: "${PROXEUS_TEST_MODE:-false}"
PROXEUS_ALLOW_HTTP: "${PROXEUS_ALLOW_HTTP:-true}"
# Replace values for reverse-proxy
VIRTUAL_HOST: ${PROXEUS_VIRTUAL_HOST:-proxeus.example.com}
VIRTUAL_PORT: 1323
# Replace values for letsencrypt
LETSENCRYPT_HOST: ${PROXEUS_VIRTUAL_HOST:-proxeus.example.com}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-admin@proxeus.example.com}
ports:
- "1323:1323"
volumes:
- ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted
- ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings

# Add Nginx reverse-proxy
# https://hub.docker.com/r/jwilder/nginx-proxy/
# Automated Nginx reverse proxy for docker containers
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- nginx-share:/etc/nginx/vhost.d
- nginx-share:/usr/share/nginx/html
- ./nginx-timeout.conf:/etc/nginx/conf.d/nginx-timeout.conf
- ${PROXEUS_DATA_DIR:-./data}/certs:/etc/nginx/certs:ro
- ${DOCKER_SOCK:-/var/run/docker.sock}:/tmp/docker.sock:ro
networks:
- reverse-proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
restart: unless-stopped

# Add Letsencrypt
# https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/
# LetsEncrypt container to use with nginx as proxy
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
depends_on:
- nginx-proxy
networks:
- reverse-proxy
volumes:
- nginx-share:/etc/nginx/vhost.d
- nginx-share:/usr/share/nginx/html
- ${PROXEUS_DATA_DIR:-./data}/certs:/etc/nginx/certs:rw
- ${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock:ro
restart: unless-stopped

document-service:
image: proxeus/document-service:latest
container_name: xes_document_service
networks:
- xes-platform-network
- reverse-proxy
restart: unless-stopped
environment:
TZ: Europe/Zurich
# Replace values for reverse-proxy
VIRTUAL_HOST: ${DOCUMENT_SERVICE_VIRTUAL_HOST:-proxeus.example.com}
VIRTUAL_PORT: 2115
# Replace values for letsencrypt
LETSENCRYPT_HOST: ${DOCUMENT_SERVICE_VIRTUAL_HOST:-proxeus.example.com}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-admin@example.com}
ports:
- "2115:2115"
volumes:
- ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs
- ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts

node-mail-sender:
image: proxeus/node-mail-sender:latest
container_name: xes_node-mail-sender
networks:
- xes-platform-network
restart: unless-stopped
environment:
PROXEUS_INSTANCE_URL: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
SERVICE_SECRET: secret
SERVICE_PORT: 8013
SERVICE_URL: "${NODE_CRYPTO_RATES_URL:-http://node-mail-sender:8013}"
TZ: Europe/Zurich
PROXEUS_SPARKPOST_API_KEY: "${PROXEUS_SPARKPOST_API_KEY}"
ports:
- "8013:8013"

node-json-sender:
image: proxeus/node-json-sender:latest
container_name: xes_node-json-sender
networks:
- xes-platform-network
restart: unless-stopped
environment:
PROXEUS_INSTANCE_URL: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
SERVICE_SECRET: secret
SERVICE_PORT: 8015
SERVICE_URL: "${SERVICE_DOMAIN:-http://node-json-sender:8015}"
JSON_SENDER_URL: http://url:123/endpoint
JSON_SENDER_HEADER_clientid: client_id
JSON_SENDER_HEADER_tenantid: tenant_id
JSON_SENDER_HEADER_secret: secret
JSON_SENDER_HEADER_oauthserverurl: oauth_url
TZ: Europe/Zurich
ports:
- "8015:8015"

volumes:
# Add volume for nginx-proxy and letsencrypt
nginx-share:

12 changes: 11 additions & 1 deletion docs/build_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ docker-compose restart
This will build the proxeus-core image based on your current project and use a deployed image
for the document service.

If you're having trouble, try a clean full build, specifying each of the configuration files:
## Using Docker for the build

If you're having trouble, try a clean full Docker build, specifying each of the configuration files:

```
make clean
Expand All @@ -58,3 +60,11 @@ instead of the default `docker-compose.override.yml`:
```
docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml
```

## Docker Light version

There is also a Docker Compose configure in one file with a 'minimal' Proxeus installation. The only extra nodes are 'mail-sender' and 'json-sender':

```
docker-compose -f docker-compose-light.yml
```
32 changes: 25 additions & 7 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,70 @@ A brief installation guide. Find more details and explanation of the configurati
You can access the source code of this application on the [Proxeus GitHub repository](https://github.com/ProxeusApp).

## Install docker and docker-compose

The quickest way to try Proxeus is to use `docker-compose`.

1. [Install Docker Engine](https://docs.docker.com/install/)
2. [Install docker-compose](https://docs.docker.com/compose/install/)

## Get API Keys for Infura and SparkPost

The Proxeus platform depends on [Infura](https://infura.io/) and [SparkPost](https://www.sparkpost.com/)
for Ethereum and email integration respectively.

Please create an account on those platform and get an API Keys.

## Proxeus Demo Ethereum Smart Contract
## Proxeus Demo Smart Contract

For your convenience, a demo smart contract is deployed on several networks at the following address:
For your convenience, a demo smart contract is deployed on several networks at the following addresses.

You can switch between the networks using the environment configuration `PROXEUS_BLOCKCHAIN_NET`

### Ethereum: Sepolia

### Sepolia
```
0x9bc518Fd070BE3DBB07399261688015744a7FB02
```
[Verify on Etherscan](https://sepolia.etherscan.io/address/0x9bc518Fd070BE3DBB07399261688015744a7FB02#code)

### Goerli
`PROXEUS_BLOCKCHAIN_NET=sepolia`

### Ethereum: Goerli

```
0x66FF4FBF80D4a3C85a54974446309a2858221689
```
[Verify on Etherscan](https://goerli.etherscan.io/address/0x66FF4FBF80D4a3C85a54974446309a2858221689#code)

`PROXEUS_BLOCKCHAIN_NET=goerli`

### Ethereum: Mainnet

### Mainnet
```
0xf63e471d8cbc57517c37c39c35381a385628e012
```
[Verify on Etherscan](https://etherscan.io/address/0xf63e471d8cbc57517c37c39c35381a385628e012)

### Polygon-mumbai
`PROXEUS_BLOCKCHAIN_NET=main`

### Polygon: mumbai

```
0x00119d8C02bbC4c1231D054BB2813792B4411Ed5
```
[Verify on Etherscan](https://mumbai.polygonscan.com/address/0x00119d8C02bbC4c1231D054BB2813792B4411Ed5)

`PROXEUS_BLOCKCHAIN_NET=polygon-mumbai`

### Polygon: main

### Polygon
```
0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4
```
[Verify on Etherscan](https://polygonscan.com/address/0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4)

`PROXEUS_BLOCKCHAIN_NET=polygon`

## Create a docker-compose.yml file

**Note: Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version.**
Expand Down
15 changes: 3 additions & 12 deletions ui/wallet/src/ProxeusEthereum/config/service-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ const serviceConfig = {
PROXEUS_FS_PAST_ADDRESSES: [
]
},
'polygon-mumbai': {
DEFAULT_GAS_REGULAR: 1000000,
DEFAULT_GAS_CREATE: 4000000,
XES_TOKEN_ADDRESS: '0xf94BdC648A30719fF0cf91B436f9819F7804e1a0',
PROXEUS_FS_ADDRESS: '0x00119d8C02bbC4c1231D054BB2813792B4411Ed5',
// When the PROXEUS_FS_ADDRESS changes add the old address to the list below so that file validation check also past contracts
PROXEUS_FS_PAST_ADDRESSES: [
]
},
main: {
DEFAULT_GAS_REGULAR: 1000000,
DEFAULT_GAS_CREATE: 4000000,
Expand All @@ -44,11 +35,11 @@ const serviceConfig = {
PROXEUS_FS_PAST_ADDRESSES: [
]
},
ropsten: {
'polygon-mumbai': {
DEFAULT_GAS_REGULAR: 1000000,
DEFAULT_GAS_CREATE: 4000000,
XES_TOKEN_ADDRESS: '0x84E0b37e8f5B4B86d5d299b0B0e33686405A3919',
PROXEUS_FS_ADDRESS: '0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71', // Eternal Storage at: 0x7b83acb323fd4bbd874c1e9c295e0f486d94b233
XES_TOKEN_ADDRESS: '0xf94BdC648A30719fF0cf91B436f9819F7804e1a0',
PROXEUS_FS_ADDRESS: '0x00119d8C02bbC4c1231D054BB2813792B4411Ed5',
// When the PROXEUS_FS_ADDRESS changes add the old address to the list below so that file validation check also past contracts
PROXEUS_FS_PAST_ADDRESSES: [
]
Expand Down