mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
Build modified streamline images
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
This commit is contained in:
+38
-2
@@ -1,16 +1,52 @@
|
||||
# Image Notes
|
||||
|
||||
The base images used have a few issues that should be addressed, specifically:
|
||||
- the `linux/arm64` variant does not work (appears to built for a different platform)
|
||||
- quite a few files seem to be unused, taking up space unnecessarily and making it difficult to follow
|
||||
- services should ideally be run in separate docker containers - this looks to have been at least partially implemented, but is not currently used
|
||||
- mysql configuration is managed in several places, in particular with respect to binary logging
|
||||
- binary logging needs to be configured slightly differently to work reliably with Signalytic tools (in their current state)
|
||||
|
||||
A minimal set of changes has been made to the images in order to implement an initial prototype system, this includes:
|
||||
## Changes
|
||||
### Required Changes
|
||||
A minimal set of required changes includes:
|
||||
- modify `/etc/mysql/my.cnf`
|
||||
- limit binary logging to the `streamline` database only (`binlog-do-db=streamline`)
|
||||
- remove binary log size limit (`max_binlog_size`)
|
||||
- modify `/var/www/html/.docker/mysql/mysql-init.sh`
|
||||
- remove binary log configuration from `mysqld` commands, using `my.cnf` as the sole configuration source (`--log-basename=bin --log-bin=/var/lib/mysql/logs/bin`)
|
||||
- replace the arm64 base image with a known working image
|
||||
|
||||
The reason for these changes is that the Signalytic database sync tools currently work with only a single database at a time. When using MariaDB, several system databases are generated automatically, generating additional binary logs that we are not interested in. When attempting to later apply the binary logs to a database server, conflicts may arise. An alternative approach would be to drop all databases instead, this is worth investigating in the future.
|
||||
#### Reasoning
|
||||
The reason for these changes is that the Signalytic database sync tools currently work with only a single database at a time. When using MariaDB, several system databases are generated automatically, generating additional binary logs that we are not interested in. When attempting to later apply the binary logs to a database server, conflicts may arise. An alternative approach would be to drop all databases instead, this is worth investigating in the future.
|
||||
|
||||
### Additional Changes
|
||||
A temporary solution to the failing arm64 image, is to rebuild the image based on the files already available within the official images. Some additional changes are made here to further reduce the image size. Changes include:
|
||||
- remove unused dockerfiles from the image
|
||||
- remove duplicate initialization data
|
||||
- remove unused git files
|
||||
|
||||
## Background
|
||||
### Streamline Startup Process
|
||||
```
|
||||
-- /var/www/html/start_up.sh (entrypoint, called with /bin/sh)
|
||||
|-- set env vars (app, db, user, pass, root, rootpass)
|
||||
|-- .docker/mysql/mysql-init.sh
|
||||
| |-- exec scripts from /scripts/pre-init.d/ (none)
|
||||
| |-- create binlogs folder if needed: /var/lib/mysql/logs/
|
||||
| |-- create other mysql folders if needed
|
||||
| |-- if no /var/lib/mysql yet, create then:
|
||||
| | |-- install db with "mysql_install_db ..."
|
||||
| | |-- generate db init script: create db, set permissions, etc
|
||||
| | |-- run mysqld with init script as input (binlogs set in options)
|
||||
| | `-- if /docker-entrypoint-initdb.d/ exists:
|
||||
| | |-- start mysqld (same options)
|
||||
| | |-- apply all *.sql[.gz] files in dir
|
||||
| | `-- stop mysqld
|
||||
| |-- exec scripts from /scripts/post-init.d/ (none)
|
||||
| `-- start mysqld in background
|
||||
|-- mysql query: "use streamline" ("streamline" hardcoded)
|
||||
|-- mysql query: "create database streamline" (uses db name variable)
|
||||
|-- mysql: ./.docker/mysql/scripts/streamline_initial.sql
|
||||
`- start php app
|
||||
```
|
||||
Reference in New Issue
Block a user