Commit Graph
21 Commits
Author SHA1 Message Date
alec.turner cb4c6b4c1a remove unnecessary check for setup process
autoheal was copied from kenya-emr and was still checking for a setup.pid file
and process. This won't do any harm but also does not add value.
2024-04-03 16:28:04 -07:00
alec.turner 9cbefc841f Simplify application management and align with other docker applications
The notion of application "instances" is dropped in favor of a simpler,
single-instance approach. Default values are provided for all configuration
variables so allow the app to run without additional manual configuration.

A health check and auto-heal script are added to automatically restart the
application in case it becomes unavailable during operation.
2024-03-25 09:34:34 -07:00
alec.turner 6c59b1ab76 bugfixes and cleanup from kenyaemr
- fix monitor script
- fix to allow docker build-image script to run from outside folder
- split instance configuration out of start script
2024-03-14 16:27:56 -07:00
alec.turner 50cb23a4c7 Packaging improvements
- compress images with xz by default (and decompress on install)
- add help menu and command line argument parsing to package.sh
- display packaging status if `pv` command available
2024-03-11 16:29:59 -07:00
alec.turner a424394109 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
2024-03-10 16:17:50 -07:00
alec.turner 2ffc3c408a update readme file with notes on building docker images 2024-03-10 14:59:39 -07:00
alec.turner 63ba4d29c8 Update docker images to modify mysql configuration
Dockerfiles are updated with two key changes:
- use streamline's official images as a base
- replace two files related to mysql configuration

A README.md file is added to the docker folder which details the changes, but
the key difference is to limit binary logs to only the `streamline` database.
This prevents additional system databases from being included, which the
database sync tools do not (yet) support.

An unrelated bugfix corrects the docker-compose image tag, specifying 'latest'
instead of a previously hard-coded version.
2024-03-10 14:51:17 -07:00
alec.turner e88aef18f4 Add image utils and bugfixes from kenya-emr 2024-03-09 14:07:45 -08:00
alec.turner a4bb4f5cf6 Merge branch 'app-packaging' into 'develop'
packaging and installation scripts

Closes #2

See merge request signalytic/client-external/streamline/streamline-emr!1
2024-03-08 23:49:12 +00:00
alec.turner 6a4ab99506 fix minor typos in readme 2024-03-08 15:38:53 -08:00
alec.turner 5072872bdb update readme file to clarify installation, configuration process 2024-03-08 15:32:19 -08:00
alec.turner 41a04e5b2d ensure stop is always called at the end of entry script
interrupts were not properly handled by the entry script, and could leave
containers active. This is fixed by running stop in a cleanup function, called
on exit.
2024-03-08 12:53:35 -08:00
alec.turner 0ef5029931 add version file to package and print version on start 2024-03-08 12:39:18 -08:00
alec.turner a2a9395e39 Make image packaging and installation optional
Eventually, images should not be transferred as part of the application package,
using a more efficient mechanism instead. Other cases may already exist where
packaging without the image is preferrable.

When the `PACKAGE_IMAGES` variable is not set to 1 (default: 1), images will not
be included in the package. The installation script now handles the case where
the `images` folder is missing altogether.
2024-03-08 12:29:40 -08:00
alec.turner 04cbf6b1af Reimplement scripts to support multiple app instances
An additional config file `instances.conf` is added to define instance names and
port numbers. The existing `app.conf` was also modified to include an
`instances` field and to move node id and location under this new object. A
`.env` file is used to manage configuration for each instance.

Additional scripts are added: `start`, `stop`, `monitor` - see docs for
description. The main entry script is also modified such that it will run until
any service stops, then brings down the remaining services and exits.
2024-03-08 12:29:37 -08:00
alec.turner 407baf9727 correction to package format
the package format was slightly off - there should have been a folder in the
root of the archive wrapping the package contents. This is now implemented.
2024-03-06 09:03:03 -08:00
alec.turner 3c3af11360 build separate x86_64/aarch64 packages and explicitly define images 2024-03-05 15:12:55 -08:00
alec.turner 7c528766b0 updates to docker-compose.yml and documentation to allow runtime configuration
Further configuration options are made available to support running multiple
instances of the app on the same machine, including the use of docker sibling
containers. `README.md` and `template.env` are updated accordingly.

The database port is no longer exposed as this is not required to access and
manage the app at this time.
2024-03-01 11:05:50 -08:00
alec.turner 1a4756fda0 correct entry script bug and allow config from env file
- A bug in `entry` caused the script to not change into the directory correctly.
This was corrected by marking the script as bash rather than sh.
- `install.sh` now stops a running service before updating
- `docker-compose.yml` now assigns a consistent container name for the app
- `docker-compose.yml` now uses environment variables or a `.env` file to
  assign container name and port mappings if available
- updated readme file with better instructions
2024-02-29 16:37:12 -08:00
alec.turner ca3d2f5540 Implement basic packaging/install/entry scripts
The packaging script will create a new tar.bz2 archive containing an install
script, a set of docker images, and a root folder with files to be installed.
The root folder includes a systemd service, a docker compose file, an entry
script, and a template config file.

On installation docker images are loaded onto the target system, install files
are copied, then systemd services are installed.
2024-02-28 16:52:07 -08:00
alec.turner 9d20658851 Initial commit 2024-01-30 19:40:54 +00:00