Updated Docker Image & Added Compose Files#1
Open
Cubey2019 wants to merge 3 commits into
Open
Conversation
… instead of using run.sh (which unnecessarily clones each repository). Also includes some other changes to the image: * The vertcore user now has a fixed UID (9000). * Data is now stored in /data directory. * Insight is now installed to /app directory. * Install now uses --production flag.
…uded 3 variants (6 if including testnet versions of each): * docker-compose.yml * A simple standalone insight instance. * docker-compose-vcoin.yml * Runs multiple insight nodes and uses traefik to load balance. * docker-compose-vertcoind.yml * Similar to docker-compose-vcoin, but configures insight nodes to sync against a single vertcoind node to avoid repeated downloads of the blockchain. Each variant automatically creates a volume for the /data directory, and mounts the vertcore-node.json file from the current directory.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated the docker image file to install directly from github (instead of using run.sh, which does unnecessary stuff like cloning every repository) and use the
--productionswitch.I've assigned a fixed UID of 9000 to the vertcore user and reorganised the image so that data is stored in /data and the code is installed to /app, so if you do take these changes as-is you will need to update your docker volume mounts (
/datainstead of~/.vertcore, and eitherchown 9000or recreate the volumes).I've also added a set of docker compose files.
docker-compose.ymlis a basic compose file which runs a single Insight instance.docker-compose-vcoin.ymlcan run several Insight instances.docker-compose-vertcoind.ymlcan also run several Insight instances but each one syncs against a single vertcoind instance (by default Insight stores two copies of the blockchain, one for vcoin and one for Insight, this configuration removes the vcoin sync).For the
-vcoinand-vertcoindcompose files I ended up using traefik as a load balancer because docker's default load balancing doesn't work with sockets.io (I'm not sure how insight.vertcoin.org is set up but I've noticed that it occasionally drops its websocket connections).I've only run these on a local dev machine so I expect there may be additional testing or changes needed before these can be used on a live environment...