WIP: Wk dockerized hivemind one
This is a draft MR regarding containerization of hivemind. Below will be described work flow of the container.
- Starting
hivemind.
Simply type docker-compose up in the root dir of the hivemind repo.
- 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 frompostgres.auto.conffrom main dir, -
start_sync- will executehive sync, -
start_sync_and_server- will executehive synccommand, but as background process, andhive server, those instruction will be performed afterstart_syncfinished.
- Customization.
User can customize environment, this can by done by modified files:
-
postgres.auto.conf- variables altered in db settings, -
.env- variables fordocker-compose.ymlfile (to get one, please rename .env-example file to .env)
- Potential improvements.
- split building of hivemind exec and put it inside postgres image using COPY docker command - it can reduce image size,
- customize
hivepoiting port, - add --args to
run_hivemind.sh- in order to split commands (if needed), - update README.md
- 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