Skip to content

Commit

Permalink
Preprod to Main for v1.6.8 (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
loleg authored Sep 20, 2024
1 parent 0fa2229 commit 2db7160
Show file tree
Hide file tree
Showing 19 changed files with 157 additions and 116 deletions.
50 changes: 50 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Developer docs for contributors
---

## Hello, world!

:+1::tada: First, thanks for getting involved with Proxeus! :tada::+1:

https://github.com/ProxeusApp

Structure of **[proxeus-core](https://github.com/ProxeusApp/proxeus-core)**:

- **demo**: database dumps with preconfigured content for a fresh or demo server
- **deploy**: initialization scripts for supported cloud hosting providers
- **docs**: documentation in Markdown formatting
- **doc**: auto-generated license documentation
- **externalnode**: library for plugin nodes
- **main**: the Go backend and web application main source tree
- **service**: definition of external API services
- **storage**: database and file handling
- **sys**: key utilities, libraries, models, internal services
- **test**: unit test cases for automated backend & end-to-end testing

Other key repositories include:

- **[document-service](https://github.com/ProxeusApp/document-service)**: handling documents, generating PDFs
- **[node-go](https://github.com/ProxeusApp/node-go)**: Golang library for nodes (Proxeus extensions)
- **[proxeus-contract](https://github.com/ProxeusApp/proxeus-contract)**: Solidity code for blockchain support

## How to contribute

You can start by checking our [core issues board](https://github.com/ProxeusApp/proxeus-core/issues). A few of them are labelled `good first issue` or `hacktoberfest` or `bounty`!

If you would like to work on something, you can:

1. Comment on the issue to let us know you'd like to work on, so that we can assist you and to make sure no one has started looking into it yet.
2. If good to go, fork the main repository.
3. Clone the forked repository to your machine.
4. Create a feature branch (e.g. `50-update-readme`, where `50` is the number of the related issue).
5. Commit your changes to the feature branch.
6. Add comments to the issue describing the changes.
7. Push the feature branch to your forked repository.
8. Create a Pull Request against the original repository.
- add a short description of the changes included in the PR
9. Address review comments if requested by our demanding reviewers 😜.

If you have an idea for improvement, and it doesn't have a corresponding issue yet, simply submit a new one.

> Join our [GitHub Discussions](https://github.com/orgs/ProxeusApp/discussions) to discuss existing issues and to ask for help.
22 changes: 11 additions & 11 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ set -eo pipefail
# It checks out the proxeus source code from Github into ~/proxeus and then runs 'make install'.


yapt-get() {
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get --no-install-recommends --yes --option Dpkg::Options::="--force-confold" --option Dpkg::Options::="--force-confdef" "$@"
}

log-fail() {
declare desc="log fail formatter"
echo "$@" 1>&2
Expand All @@ -39,10 +43,6 @@ ensure-environment() {
log-fail "Docker needs to be installed."
fi

if ! command -v docker-compose &> /dev/null; then
log-fail "Docker Compose needs to be installed."
fi

FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
echo "To build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
Expand All @@ -55,22 +55,22 @@ install-requirements() {
case "$SRV_DISTRO" in
debian)
if ! dpkg -l | grep -q software-properties-common; then
apt-get update -qq >/dev/null
apt-get -qq -y --no-install-recommends install software-properties-common
yapt-get update
yapt-get install software-properties-common
fi
;;
ubuntu)
if ! dpkg -l | grep -q software-properties-common; then
apt-get update -qq >/dev/null
apt-get -qq -y --no-install-recommends install software-properties-common
yapt-get update
yapt-get install software-properties-common
fi

add-apt-repository universe >/dev/null
apt-get update -qq >/dev/null
add-apt-repository -y universe
yapt-get update
;;
esac

apt-get -qq -y --no-install-recommends install sudo git make software-properties-common
yapt-get install sudo git make software-properties-common
}

install-proxeus() {
Expand Down
3 changes: 1 addition & 2 deletions demo/mongodb/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
mongo1:
hostname: mongo1
Expand All @@ -23,4 +22,4 @@ services:
ports:
- 27019:27019
restart: unless-stopped
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0", "--port", "27019" ]
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0", "--port", "27019" ]
1 change: 0 additions & 1 deletion demo/mongodb/mongodb-single/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
mongo1:
hostname: mongo1-single
Expand Down
2 changes: 1 addition & 1 deletion deploy/digitalocean/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Proxeus Script for fast DigitalOcean deployment
---

Creates a compact all-in-one instance of the Proxeus application (no code environment for smart contracts) using a bootstrapped release image for Docker. This is a good starting point for development or small installations. For more information visit https://github.com/ProxeusApp
Creates a compact all-in-one instance of the Proxeus application using a bootstrapped release image for Docker. This is a good starting point for development or small installations. For more information visit https://github.com/ProxeusApp

Here you can find a script which run within a DigitalOcean droplet during startup. Using a simple form, you can configure the basic details needed to quickly get a Proxeus instance up and running.

Expand Down
2 changes: 1 addition & 1 deletion deploy/linode/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Proxeus StackScript for fast Linode deployment
---

Creates a compact all-in-one instance of the Proxeus application (no code environment for smart contracts) using a bootstrapped release image for Docker. This is a good starting point for development or small installations. For more information visit https://github.com/ProxeusApp
Creates a compact all-in-one instance of the Proxeus application using a bootstrapped release image for Docker. This is a good starting point for development or small installations. For more information visit https://github.com/ProxeusApp

StackScripts are private or public managed scripts which run within a Linode instance during startup. Using a simple form, you can configure the basic details needed to quickly get a Proxeus instance up and running.

Expand Down
2 changes: 0 additions & 2 deletions docker-compose-cloud.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#
# docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml up

version: '3.7'

networks:
# Add Network for reverse-proxy
reverse-proxy:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose-example.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#
# docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up

version: '3.7'

services:
node-crypto-forex-rates:
networks:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose-extra.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#
# docker-compose -f docker-compose.yml -f docker-compose-extra.override.yml up

version: '3.7'

services:
node-mail-sender:
image: proxeus/node-mail-sender:latest
Expand Down
2 changes: 0 additions & 2 deletions docker-compose-local.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#
# docker-compose -f docker-compose.yml -f docker-compose-local.override.yml up

version: '3.7'

services:
xes-platform:
image: !reset null
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Basic version of the Docker Compose deployment -
# Which can be extended with the .override.yml files

version: '3.7'

networks:
xes-platform-network:
name: xes-platform-network
Expand Down
8 changes: 3 additions & 5 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@ Kindly hosted by S-PRO, the demo server allows you to try a full-featured Proxeu

Proxeus is primarily a Web application, intended for access with a web browser. The [Proxeus Association](https://proxeus.org) maintains a demo instances you can use to test the product, and can recommend a service provider to help you or your business get set up. There is also a prototype [desktop application](https://github.com/ProxeusApp/storage-app/blob/master/docs/overview.md).

In addition to the developer guidelines below, several "one-click" deployment configurations are available for select cloud platforms:
In addition to the developer guidelines below, several "one-click" deployment configurations are available for select cloud platforms. Join the [Discussions](https://github.com/ProxeusApp/community/discussions/3) on GitHub if you are interested in seeing additional providers on this list:

- [Docker Compose](docs/docker.md)
- [Linode StackScript](deploy/linode/README.md)
- [DigitalOcean Droplet](deploy/digitalocean/README.md)

You will still need API keys for Infura and Sparkpost, as [detailed below](#get-keys).

Join the [Discussions](https://github.com/ProxeusApp/community/discussions/3) if you are interested in seeing additional providers on this list.

Please read the [Developer Manual](https://doc.proxeus.com) to learn more about developing for the Proxeus platform.

**By installing and using the Proxeus software you agree with the terms of the [Proxeus License Agreement](https://github.com/ProxeusApp/proxeus-core/blob/main/LICENSE).**
**By installing and using the Proxeus software you agree with the terms of the [Proxeus License Agreement](https://github.com/ProxeusApp/proxeus-core/blob/main/LICENSE)** (GPL-3.0)

## Installing from Source

You can access the source code of this application on the [Proxeus repository](https://github.com/ProxeusApp) on GitHub (a mirror is available on [Codeberg/Proxeus](https://codeberg.org/proxeus/).
You can access the source code of this application on the [ProxeusApp](https://github.com/ProxeusApp) repository on GitHub, or the [Proxeus mirror](https://codeberg.org/proxeus/) on Codeberg.

If you wish to build the project from source, follow the instructions in [Build all](build_all.md).

Expand Down
22 changes: 11 additions & 11 deletions externalnode/external_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"bytes"
"encoding/json"
"errors"
"github.com/dgrijalva/jwt-go"
"github.com/labstack/echo/v4"
"log"

"fmt"
"io/ioutil"
"log"
"net/http"

"fmt"
"time"

"github.com/golang-jwt/jwt/v5"
"github.com/labstack/echo/v4"
)

type (
Expand All @@ -25,8 +24,8 @@ type (
}

ExternalNodeInstance struct {
ID string `json:"id" storm:"id"`
NodeName string `json:"nodeName"`
ID string `json:"id" storm:"id"`
NodeName string `json:"nodeName"`
Config map[string]interface{} `json:"nodeConfig"`
}

Expand Down Expand Up @@ -130,9 +129,10 @@ func (e *ExternalNode) HealthUrl() string {
}

func (e ExternalQuery) jwtToken() string {
claims := jwt.StandardClaims{
Id: e.ExternalNodeInstance.ID,
ExpiresAt: time.Now().Add(time.Hour * 24).Unix(),
exp := time.Now().Add(time.Hour * 24)
claims := jwt.RegisteredClaims{
Subject: e.ExternalNodeInstance.ID,
ExpiresAt: jwt.NewNumericDate(exp),
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
t, err := token.SignedString([]byte(e.Secret))
Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ module github.com/ProxeusApp/proxeus-core

go 1.22

toolchain go1.22.3
toolchain go1.22.0

require (
github.com/SparkPost/gosparkpost v0.2.0
github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154
github.com/c2h5oh/datasize v0.0.0-20231215233829-aa82cc1e6500
github.com/cespare/cp v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/disintegration/imaging v1.6.2
github.com/dop251/goja v0.0.0-20240627195025-eb1f15ee67d2
github.com/ethereum/go-ethereum v1.14.7
github.com/ethereum/go-ethereum v1.14.8
github.com/fatih/structs v1.1.0 // indirect
github.com/golang/mock v1.6.0
github.com/google/go-querystring v1.1.0 // indirect
Expand All @@ -32,8 +31,8 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.etcd.io/bbolt v1.3.10 // indirect
golang.org/x/crypto v0.25.0
golang.org/x/net v0.27.0
golang.org/x/crypto v0.26.0
golang.org/x/net v0.28.0
gopkg.in/gavv/httpexpect.v2 v2.16.0
)

Expand All @@ -60,16 +59,17 @@ require (
)

require (
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/labstack/echo/v4 v4.12.0
go.mongodb.org/mongo-driver v1.16.0
go.mongodb.org/mongo-driver v1.16.1
)

require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
Expand All @@ -86,7 +86,7 @@ require (
github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/holiman/uint256 v1.3.0 // indirect
github.com/holiman/uint256 v1.3.1 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
Expand All @@ -102,9 +102,9 @@ require (
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.5.0 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 2db7160

Please sign in to comment.