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

update digitalocean deployment script #24

Merged
merged 1 commit into from
Nov 23, 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
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 [email protected]). 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!"