<commit_before>whaleware
=========

A standard startup template for Docker images.

Benefits
--------
- Common filesystem layout. Just replace files as needed.
- JSON configuration. The configuration is passed as a JSON file that is merged with an existing defaults file. 
  So you do not have to track a large number of separate environment variables. 
- Centrally reports the state of an instance. 
- Periodically reports health statistics.
- Monitors the application and restarts it if needed
- Makes no assumption on the kind of services used for reporting - we use HTTP, but you may hot-swap the reporting
  scripts to implement your own checks and reporting format.
- Tries to terminate all services gracefully on stops.



Directories used
----------------

- /whaleware - where all files for whaleware live
- /data - where all data for an app is to be positioned
- /backup - a mount point for backup scripts to send data to the host


Scripts used
------------

- run - the script that orchestrates all other scripts
- firstboot - the scripts that sets the system up for the first boot
- lifecycle -
- pushstats -
- monitor -
- stop - tries to terminate services gracefully



An app's life cycle
-------------------

- FIRSTBOOT
- UPGRADING
- WARMUP
- UP<commit_msg>Explains life-cycle<commit_after>whaleware
=========

A standard startup template for Docker images.

Benefits
--------
- Common filesystem layout. Just replace files as needed.
- JSON configuration. The configuration is passed as a JSON file that is merged with an existing defaults file. 
  So you do not have to track a large number of separate environment variables. 
- Centrally reports the state of an instance. 
- Periodically reports health statistics.
- Monitors the application and restarts it if needed
- Makes no assumption on the kind of services used for reporting - we use HTTP, but you may hot-swap the reporting
  scripts to implement your own checks and reporting format.
- Tries to terminate all services gracefully on stops.



Directories used
----------------

- /whaleware - where all files for whaleware live
- /data - where all data for an app is to be positioned
- /backup - a mount point for backup scripts to send data to the host


Scripts used
------------

- run - the script that orchestrates all other scripts
- firstboot - the scripts that sets the system up for the first boot
- upgrade - upgrades the system (eg applies database schema changes)
- warmup - starts services and warms them up
- lifecycle [STATE]
- pushstats -
- monitor -
- stop - tries to terminate services gracefully



An app's life cycle
-------------------

- FIRSTBOOT
- UPGRADING
- WARMUP
- UP
{'fraction_non_alphanumeric': 0.08744394618834081, 'fraction_numerical': 0.0, 'mean_word_length': 2.902332361516035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '998295', 'n_tokens_mistral': 687, 'n_tokens_neox': 658, 'n_words': 371}