Skip to content

Updated Docker Image & Added Compose Files#1

Open
Cubey2019 wants to merge 3 commits into
vertcoin-project:masterfrom
Cubey2019:swarm
Open

Updated Docker Image & Added Compose Files#1
Cubey2019 wants to merge 3 commits into
vertcoin-project:masterfrom
Cubey2019:swarm

Conversation

@Cubey2019

Copy link
Copy Markdown

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 --production switch.

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 (/data instead of ~/.vertcore, and either chown 9000 or recreate the volumes).

I've also added a set of docker compose files.

  • docker-compose.yml is a basic compose file which runs a single Insight instance.
  • docker-compose-vcoin.yml can run several Insight instances.
  • docker-compose-vertcoind.yml can 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 -vcoin and -vertcoind compose 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...

… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant