From 472f133ad9bd640d4c58d033f18142211deb06ea Mon Sep 17 00:00:00 2001 From: Emeka Mosanya Date: Mon, 23 Sep 2019 18:23:45 +0200 Subject: [PATCH] Updates documentation and fix broken links * Fixed some broken links * Updated the documentation, especially the Quickstart and Docker deployment, to no require access to the sourced code. --- README.md | 57 +++++++++- docs/api_start_workflow.md | 2 +- docs/configure.md | 2 +- docs/custom_workflow_nodes.md | 11 +- docs/docker.md | 196 ++++++++++++++++++++++++++++++++++ docs/frontend.md | 4 +- docs/quickstart.md | 55 +++++++++- 7 files changed, 318 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 39f3ed09c..49113156e 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,59 @@ For your convenience, a demo smart contract is deployed on the Ropsten network a 0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71 ``` +### 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.** + +User the example below as your `docker-compose.yml` file: + +``` +version: '3.7' + +networks: + xes-platform-network: + name: xes-platform-network + +services: + platform: + image: proxeus/proxeus-core:latest + container_name: xes_platform + depends_on: + - document-service + networks: + - xes-platform-network + restart: unless-stopped + environment: + TZ: Europe/Zurich + DataDir: "/data/hosted" + DocumentServiceUrl: "http://document-service:2115/" + InfuraApiKey: "${PROXEUS_INFURA_KEY}" + SparkpostApiKey: "${PROXEUS_SPARKPOST_KEY}" + BlockchainContractAddress: "${PROXEUS_CONTRACT_ADDRESS}" + EmailFrom: "${PROXEUS_EMAIL_FROM:-no-reply@proxeus.com}" + AirdropWalletfile: "${PROXEUS_AIRDROP_WALLET_FILE:-./data/proxeus-platform/settings/airdropwallet.json}" + AirdropWalletkey: "${PROXEUS_AIRDROP_WALLET_KEY:-./data/proxeus-platform/settings/airdropwallet.key}" + ports: + - "1323:1323" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings + + document-service: + image: proxeus/document-service:latest + container_name: xes_document_service + networks: + - xes-platform-network + restart: unless-stopped + environment: + TZ: Europe/Zurich + ports: + - "2115:2115" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs + - ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts +``` + ### Start Proxeus Run the following command (Linux and OSX): @@ -51,8 +104,8 @@ If you are a developer and want to build the project form the source code follow ## Developer manual -Please read the [Developer Manual](docs/_sidebar.md) to learn more about the -Proxeus platform. *TODO: link to the github pages documentation site when ready* +Please read the [Developer Manual](https://doc.proxeus.com) to learn more about the +Proxeus platform. ## User manual diff --git a/docs/api_start_workflow.md b/docs/api_start_workflow.md index 52554a428..ea36e0598 100644 --- a/docs/api_start_workflow.md +++ b/docs/api_start_workflow.md @@ -1,6 +1,6 @@ # Start Workflow using the API -**Note**: Call to the API must be [autenticated](api_auth.md). +**Note**: Call to the API must be [authenticated](api_auth.md). It is possible to start a workflow programmatically using the API. This is a three step process: diff --git a/docs/configure.md b/docs/configure.md index 281182cc6..0b40630c2 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -24,7 +24,7 @@ Generate a [infura API Key](https://infura.io) no-reply@proxeus.com ``` ## sparkpost api key -setup a free account on https://www.sparkpost.com +setup a free account on [SparkPost](https://www.sparkpost.com) ## Initial Email Use your email address for the root user and choose a secure password. diff --git a/docs/custom_workflow_nodes.md b/docs/custom_workflow_nodes.md index 84ab346f4..251a0cfa9 100644 --- a/docs/custom_workflow_nodes.md +++ b/docs/custom_workflow_nodes.md @@ -1,5 +1,9 @@ # Custom Workflow Nodes +**Note: Creating custom workflow nodes requires access to the source code and will be available at a later time +when the Proxeus github repositories will be publicly accessible** + + Custom workflow nodes are the primary method to extend Proxeus workflow to any use cases. They are written in Golang and can @@ -24,18 +28,21 @@ NodeIF interface { } ``` - - ## Workflow Context Each workflow node must have access to the `DocumentFlowInstance` context which gives full access to workflow data. + + + diff --git a/docs/docker.md b/docs/docker.md index 8b90e4cea..ce149a5da 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -18,6 +18,57 @@ used to deploy the platform in different context: This is the simplest method to experiment with Proxeus. This will start a local Proxeus platform using images from Docker Hub. +### docker-compose.yml file + +``` +version: '3.7' + +networks: + xes-platform-network: + name: xes-platform-network + +services: + platform: + image: proxeus/proxeus-core:latest + container_name: xes_platform + depends_on: + - document-service + networks: + - xes-platform-network + restart: unless-stopped + environment: + TZ: Europe/Zurich + DataDir: "/data/hosted" + DocumentServiceUrl: "http://document-service:2115/" + InfuraApiKey: "${PROXEUS_INFURA_KEY}" + SparkpostApiKey: "${PROXEUS_SPARKPOST_KEY}" + BlockchainContractAddress: "${PROXEUS_CONTRACT_ADDRESS}" + EmailFrom: "${PROXEUS_EMAIL_FROM:-no-reply@proxeus.com}" + AirdropWalletfile: "${PROXEUS_AIRDROP_WALLET_FILE:-./data/proxeus-platform/settings/airdropwallet.json}" + AirdropWalletkey: "${PROXEUS_AIRDROP_WALLET_KEY:-./data/proxeus-platform/settings/airdropwallet.key}" + ports: + - "1323:1323" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings + + document-service: + image: proxeus/document-service:latest + container_name: xes_document_service + networks: + - xes-platform-network + restart: unless-stopped + environment: + TZ: Europe/Zurich + ports: + - "2115:2115" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs + - ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts +``` + +### Start + ``` docker-compose up ``` @@ -36,6 +87,56 @@ Environment: This file will start the document service available from Docker Hub but will start the local Platform built from your local files. This method is preferred during development. +### docker-compose-dev.yml + +``` +version: '3.7' + +networks: + xes-platform-network: + name: xes-platform-network + +services: + platform: + build: + context: . + container_name: xes_platform + networks: ['xes-platform-network'] + restart: unless-stopped + environment: + TZ: Europe/Zurich + DataDir: "/data/hosted" + DocumentServiceUrl: "http://document-service:2115/" + BlockchainContractAddress: "${PROXEUS_CONTRACT_ADDRESS}" + InfuraApiKey: "${PROXEUS_INFURA_KEY}" + SparkpostApiKey: "${PROXEUS_SPARKPOST_KEY}" + EmailFrom: "${PROXEUS_EMAIL_FROM:-no-reply@proxeus.com}" + AirdropWalletfile: "${PROXEUS_AIRDROP_WALLET_FILE:-/root/.proxeus/settings/airdropwallet.json}" + AirdropWalletkey: "${PROXEUS_AIRDROP_WALLET_KEY:-/root/.proxeus/settings/airdropwallet.key}" + TestMode: "${PROXEUS_TEST_MODE:-false}" + ports: + - "1323:1323" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings + + document-service: + #todo: change image with proxeus docker registry + image: proxeus/document-service:latest + container_name: xes_document_service + networks: ['xes-platform-network'] + restart: unless-stopped + environment: + TZ: Europe/Zurich + ports: + - "2115:2115" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs + - ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts +``` + + +### Start ``` make server-docker docker-compose -f docker-compose-dev.yml build @@ -68,6 +169,101 @@ running docker compose in production. This is the method that we use to deploy the Proxeus Demo site. +### docker-compose-cloud-override.yml + +``` +# This file is an override and needs to be used in combination with docker-compose.yml like the following: +# docker-compose -f docker-compose.yml -f docker-compose-hosted.yml up +version: '3.7' + +networks: +# Add Network for reverse-proxy + reverse-proxy: + name: reverse-proxy + driver: bridge + +volumes: +# Add volume for nginx-proxy and letsencrypt + nginx-share: + +services: + +# 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 + - ${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 + + platform: + networks: + - reverse-proxy + labels: + com.centurylinklabs.watchtower.enable: "true" + environment: +# Replace values for reverse-proxy + VIRTUAL_HOST: proxeus.example.com + VIRTUAL_PORT: 1323 +# Replace values for letsencrypt + LETSENCRYPT_HOST: proxeus.example.com + LETSENCRYPT_EMAIL: admin@example.com + + document-service: + networks: + - reverse-proxy + labels: + com.centurylinklabs.watchtower.enable: "true" + environment: +# Replace values for reverse-proxy + VIRTUAL_HOST: proxeus.example.com + VIRTUAL_PORT: 2115 +# Replace values for letsencrypt + LETSENCRYPT_HOST: proxeus.example.com + LETSENCRYPT_EMAIL: admin@example.com + +# Add Watchtower +# https://hub.docker.com/r/v2tec/watchtower/ +# Watches your containers and automatically restarts them whenever their image is refreshed + watchtower: + image: v2tec/watchtower + container_name: watchtower + restart: always + volumes: + - ${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock:ro + - ${DOCKER_CONFIG_FILE:-/root/.docker/config.json}:/config.json + command: --interval 60 --label-enable +``` + +### Start ``` docker-compose -f docker-compose.yml -f docker-compose-cloud-override.yml -d up diff --git a/docs/frontend.md b/docs/frontend.md index 24ade57fc..092bde88c 100644 --- a/docs/frontend.md +++ b/docs/frontend.md @@ -47,9 +47,9 @@ the latest production build. Use 3005 if you want to use the latest frontend fea - Progressive Web Apps https://developers.google.com/web/progressive-web-apps/ - FileSystem API https://developer.mozilla.org/en-US/docs/Web/API/FileSystem -- Web3 https://web3js.readthedocs.io/en/1.0/index.html +- Web3 https://github.com/ethereum/web3.js/tree/v0.20.6 - ES6/ES7… https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c - Async/Await https://medium.com/@rafaelvidaurre/truly-understanding-async-await-491dd580500e - JavaScript https://developer.mozilla.org/bm/docs/Web/JavaScript -- Bootstrap https://getbootstrap.com/docs/4.1/getting-started/introduction/ \ No newline at end of file +- Bootstrap https://getbootstrap.com/docs/4.1/getting-started/introduction/ diff --git a/docs/quickstart.md b/docs/quickstart.md index 76b3af9e7..e15463900 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -20,9 +20,62 @@ For your convenience, a demo smart contract is deployed on the Ropsten network a 0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71 ``` +## 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.** + +User the example below as your `docker-compose.yml` file: + +``` +version: '3.7' + +networks: + xes-platform-network: + name: xes-platform-network + +services: + platform: + image: proxeus/proxeus-core:latest + container_name: xes_platform + depends_on: + - document-service + networks: + - xes-platform-network + restart: unless-stopped + environment: + TZ: Europe/Zurich + DataDir: "/data/hosted" + DocumentServiceUrl: "http://document-service:2115/" + InfuraApiKey: "${PROXEUS_INFURA_KEY}" + SparkpostApiKey: "${PROXEUS_SPARKPOST_KEY}" + BlockchainContractAddress: "${PROXEUS_CONTRACT_ADDRESS}" + EmailFrom: "${PROXEUS_EMAIL_FROM:-no-reply@proxeus.com}" + AirdropWalletfile: "${PROXEUS_AIRDROP_WALLET_FILE:-./data/proxeus-platform/settings/airdropwallet.json}" + AirdropWalletkey: "${PROXEUS_AIRDROP_WALLET_KEY:-./data/proxeus-platform/settings/airdropwallet.key}" + ports: + - "1323:1323" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted + - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings + + document-service: + image: proxeus/document-service:latest + container_name: xes_document_service + networks: + - xes-platform-network + restart: unless-stopped + environment: + TZ: Europe/Zurich + ports: + - "2115:2115" + volumes: + - ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs + - ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts +``` + ## Start Proxeus -Run the following command (Linux and OSX): +Run the following command in the directory containing your `docker-compose.yml` file (Linux and OSX): ``` export PROXEUS_INFURA_KEY= export PROXEUS_SPARKPOST_KEY=