Skip to content

man4ish/omnibioai-db-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

omnibioai-db-init

Database initialization scripts for the OmniBioAI platform. These files are automatically executed by MySQL on first container startup via the docker-entrypoint-initdb.d mechanism.

Files

00-create-dbs.sql

Runs first (alphabetical order is guaranteed by MySQL's entrypoint). Creates the required databases if they don't already exist:

  • omnibioai — main application database used by the workbench
  • limsdb — Laboratory Information Management System (LIMS) database
  • model_registry — model registry database
  • omnibioai_licenses — license server database

omnibioai.sql

Full schema and seed data dump for the main omnibioai database (~28 MB). Applied after database creation.

limsdb.sql

Full schema and seed data dump for the limsdb LIMS database (~76 KB). Applied after database creation.

Usage

This directory is referenced in the OmniBioAI docker-compose stack via the DB_INIT_DIR environment variable:

DB_INIT_DIR=/home/manish/Desktop/machine/omnibioai-db-init

It is mounted into the MySQL container as a read-only volume:

mysql:
  volumes:
    - ${DB_INIT_DIR}:/docker-entrypoint-initdb.d:ro

Note: These scripts only run when the MySQL data volume is empty (i.e. on first startup or after docker volume rm mysql_data). Re-running the stack with an existing volume will not re-apply these scripts.

Re-initializing the Database

If you need to reset and re-apply all init scripts:

docker compose down -v        # removes volumes including mysql_data
docker compose up mysql -d    # re-creates and re-runs init scripts

Updating the Dumps

To regenerate the SQL dumps from a running instance:

# Main app database
docker exec <mysql-container> mysqldump -uroot -p omnibioai > omnibioai.sql

# LIMS database
docker exec <mysql-container> mysqldump -uroot -p limsdb > limsdb.sql

Related Repositories

About

MySQL initialization scripts for the OmniBioAI platform — creates databases and loads schema/seed data on first container startup.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors