Last active
August 18, 2022 03:48
-
-
Save BigOokie/ea60838fee0bfc7733662c8c1cfaafba to your computer and use it in GitHub Desktop.
Load-balanced Skycoin in Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Ensure Docker is installed. | |
2. Create a new pair of Docker Volumes for each the Skycoin Node instance | |
- `docker volume create skycoin-1-wallet` | |
- `docker volume create skycoin-1-data` | |
3. Create and run a new Docker container for the new instance. | |
- `docker run -d -v skycoin-1-data:/data/.skycoin -v skycoin-1-wallet:/wallet -p 6000:6000 -p 6420:6420 --name skycoin-node-1 skycoinproject/skycoin` | |
Repeat the above steps as many times as you want Skycoin Nodes. Make sure to do the following for each however: | |
- Create new volumes | |
- Map different host ports (6000 and 6420, 6001 and 6421, etc) | |
- Set different names for each container | |
Next ensure Caddy is installed then use the following template to configure Caddy (via the Caddyfile) to server and load-balance the instances: | |
skycoin.mydomain.com { | |
tls { | |
dns cloudflare | |
} | |
log stdout | |
errors | |
proxy / 10.1.1.1:6420 10.1.1.1:6421 { | |
health_check /api/v1/health | |
transparent | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment