Skip to content

WIP: Wk dockerized hivemind one

Wieslaw Kedzierski requested to merge wk-dockerized-hivemind-one into develop

This is a draft MR regarding containerization of hivemind. Below will be described work flow of the container.

  1. Starting hivemind.

Simply type docker-compose up in the root dir of the hivemind repo.

  1. Work flow.

After type docker-compose up, container hivemind:postgres will be lunched (builded first, if not exists). Then, inside container will be executed run_hivemind.sh script, which will do:

  • start_db - will execute starting sequence of postgres image, in order to run postgresql db, after that, it will alter config file, using variables from postgres.auto.conf from main dir,
  • start_sync - will execute hive sync,
  • start_sync_and_server - will execute hive sync command, but as background process, and hive server, those instruction will be performed after start_sync finished.
  1. Customization.

User can customize environment, this can by done by modified files:

  • postgres.auto.conf - variables altered in db settings,
  • .env - variables for docker-compose.yml file (to get one, please rename .env-example file to .env)
  1. Potential improvements.
  • split building of hivemind exec and put it inside postgres image using COPY docker command - it can reduce image size,
  • customize hive poiting port,
  • add --args to run_hivemind.sh - in order to split commands (if needed),
  • update README.md
  1. TODO

Dan: Can we build in support for saving and loading dbase state? And does it support easy schema migration? I am asking because we are likely going to have a lot of hivemind updating as we make improvements. If nodes can do it easily it will save us time.

Edited by Wieslaw Kedzierski

Merge request reports

Loading