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

Droplet support updates #434

Merged
merged 32 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9bfb0ac
Merge pull request #12 from ProxeusApp/preprod
tafonina Jun 9, 2023
9d3d6a2
fix web3.fromAscii to web3.utils.asciiToHex method in document floe
Jun 13, 2023
029ab3e
Merge pull request #14 from sprotest/feature/fix-web3-method-fromAscii
tafonina Jun 13, 2023
028563a
replace web3 to this.wallet.proxeusFS.web3 as metamask no longer inje…
Jun 13, 2023
b069463
Merge pull request #15 from sprotest/feature/fix-web3-method-fromAscii
tafonina Jun 13, 2023
a5e9d02
Merge pull request #16 from ProxeusApp/preprod
tafonina Oct 19, 2023
26ef319
remove outdated methods of old smart contract
slavas490 Oct 24, 2023
6b2c7fc
add public urls in case user doesnt have metamask
Oct 24, 2023
7bff03b
Merge pull request #18 from sprotest/feature/remove-old-smartcontract…
slavas490 Oct 24, 2023
614e5a9
Merge branch 'develop' into feature/verify-doc
tafonina Oct 27, 2023
3710bb3
Merge pull request #19 from sprotest/feature/verify-doc
tafonina Oct 27, 2023
18b6f1c
fix js frontend typos
slavas490 Nov 1, 2023
29e1324
use public url only if user doesnt have metamask installed
Nov 2, 2023
be08fea
Merge branch 'feature/verify-doc' of github.com:sprotest/proxeus-core…
Nov 2, 2023
e164676
use public url only if user doesnt have metamask installed
Nov 2, 2023
d700aa2
Merge branch 'develop' into feature/verify-doc
tafonina Nov 2, 2023
88dd2fd
Merge pull request #20 from sprotest/feature/verify-doc
tafonina Nov 2, 2023
f3ecefe
add wrong metamask network selected issue handler
slavas490 Nov 2, 2023
4a98f86
fix user validation network screen
slavas490 Nov 2, 2023
1d8af13
remove unnecessary html code from VerificationFileEntry component
slavas490 Nov 2, 2023
e11d139
fix invalid character, updates in BN lib
Nov 3, 2023
b8056f0
fix invalid character, updates in BN lib
Nov 3, 2023
e1ac271
fix invalid character, updates in BN lib, revert to string and number…
Nov 3, 2023
11f7378
Merge pull request #21 from sprotest/feature/fix-invalid-charachter
tafonina Nov 3, 2023
458c0c1
remove delete buttons for form inputs
slavas490 Nov 13, 2023
cc08ea4
remove skipValidateFor date entry
slavas490 Nov 14, 2023
6065564
Merge pull request #22 from sprotest/feature/delete_property
slavas490 Nov 14, 2023
0a4489f
fix frontend error message for file not found
slavas490 Nov 16, 2023
968c255
Merge pull request #23 from sprotest/fix/file-validation
tafonina Nov 17, 2023
a2db174
update digitalocean deployment script
slavas490 Nov 22, 2023
c8fec16
Merge pull request #24 from sprotest/feature/droplet-support
tafonina Nov 23, 2023
4fafb6f
Merge branch 'preprod' into develop
tafonina Nov 30, 2023
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
31 changes: 22 additions & 9 deletions deploy/digitalocean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,28 @@ This script is maintained for the community by Proxeus Association

## Instructions

1. Create fresh DO droplet with Ubuntu v.20+ with any basic Provision configuration
2. You will need to have your API keys for Infura and Sparkpost handy - see the root README for further details.
3. add executive permission for deploy.sh ( chmod +x deploy.sh )
4. run $PWD/proxeus-core/deploy/digitalocean/deploy.sh
5. It takes a few minutes for the server to boot and install, then you should be able to open `http://<your DO's IP address or domain>:1323/init`
6. A configuration screen will be shown where you can set up an admin account and check settings.

Once your server is running, visit the [User Handbook](https://github.com/ProxeusApp/community/blob/master/handbook/handbook.md) to get started.
1. Create fresh DO droplet with Ubuntu v.20+ with any basic Provision configuration. [Here](https://docs.digitalocean.com/products/droplets/getting-started/recommended-droplet-setup) you can find some help how to set up a production-ready droplet.
2. Make sure your API keys for Infura and Sparkpost.
3. Get the deployment script and make it executable:
```bash
wget https://raw.githubusercontent.com/ProxeusApp/proxeus-core/main/deploy/digitalocean/deploy.sh && chmod +x deploy.sh
```
4. Enter all the necessary variables, where **FQDN** - domain name for the future server, **INFURA** - your Infura API key, **SPARKPOST** - your SparkPost API key, **ADMINEMAIL** - admin email (in format like admin@proxeus.org). It can be done by editing the script file directly or by shell "export" command:
```bash
export FQDN=[value]
export INFURA=[value]
export SPARKPOST=[value]
export ADMINEMAIL=[value]
```
5. Run deployment process (go through it carefully, it may ask you any additional confirmation):
```bash
./deploy.sh
```
7. It takes a few minutes for the server to boot and install, then you should be able to open `http://<your DO's IP address or domain>:1323/init`
8. A configuration screen will be shown where you can set up an admin account and check settings.

Once your server is running, visit the [User Handbook](https://doc.proxeus.org/#/handbook) to get started.

To view the logs connect to your droplet using an SSH client program. Then paste this into the console to see the logs being updated in real time:

`cd /srv/proxeus && docker-compose logs -f`
`cd /srv/proxeus && docker-compose logs -f`
12 changes: 9 additions & 3 deletions deploy/digitalocean/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash
#specify values for local variables

# Specify values for local variables
#FQDN=<value>
#INFURA=<value>
#SPARKPOST=<value>
#ADMINEMAIL=<value>


## Performing the installation
exec 1> >(tee -a "/var/log/stackscript.log") 2>&1
function log {
echo "### $1 -- `date '+%D %T'`"
}

log "Configuring System Updates"
apt-get -o Acquire::ForceIPv4=true update -y
DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install grub-pc
Expand Down Expand Up @@ -109,11 +115,11 @@ cd /srv/proxeus
# make init server-docker

log "Starting cloud deployment via docker-compose"
docker-compose --env-file .env -f docker-compose.yml -f docker-compose-cloud.override.yml up -d &
docker-compose --env-file .env -f docker-compose.yml -f docker-compose-cloud.override.yml up -d >/dev/null 2>&1

# Open http://$FQDN:1323/init to configure your server
log "After a minute, open: http://$FQDN:1323/init"

## ----------------------------------------------

echo "Installation complete!"
echo "Installation complete!"
10 changes: 9 additions & 1 deletion ui/core/src/components/document/VerificationFileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,13 @@ export default {

this.isFileInvalidated = false

const result = await this.wallet().verifyHash(this.hash)
let result

try {
result = await this.wallet().verifyHash(this.hash)
} catch (e) {
throw new Error('UNABLE_TO_VERIFY_HASH')
}

const transaction = await this.wallet().web3.eth.getTransaction(result)
this.creator = transaction.from
Expand Down Expand Up @@ -330,6 +336,8 @@ export default {

if (this.wallet().isPublicRPCUsing) {
this.errorPublicRPC = true
} else if (e?.message === 'UNABLE_TO_VERIFY_HASH') {
this.validationException = false
} else {
this.errorValidating = true
}
Expand Down
Loading