Skip to content

mkheck/containerscripts-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Container scripts to create/run databases locally

Maintainer

Purpose

These are some scripts I use to create, configure, & run various databases on my local machine for live-coding sessions and for the databases chapter (Chapter 6 of my book, Spring Boot: Up and Running).

Warning
This should be obvious, but these scripts/configurations are not intended to be "enterprise grade" and as such, should not be used for production loads! Use them at your own risk. They work great for development and demos, though.

Here is the general order of things to set it up like I use it:

  1. Install Docker Desktop or similar container execution environment on your machine

  2. git clone this repo (or fork, then clone, etc.)

  3. Start your preferred container runtime

  4. Create the various images & start the associated containers (this must only be done once)

    1. Run the run<choose_your_database>.sh script to create a local database image (of your choice) & run the container

    2. To shut down after the initial run, simply use the appropriate "stop command" of your container runtime, e.g. docker stop <my_container_name>

  5. For subsequent startup/shutdown of these containers, simply run the corresponding "start command of your container runtime, e.g. docker start <my_container_name> & docker stop <my_container_name to start/stop

Note
For each of these databases, I map a container directory to an external directory to hold the persisted data. This is so the database isn’t empty with subsequent database creation/startup cycles (upgrades, etc.) and so it can be backed up independently of the container(s). You will need to edit this path in the run<choose_your_database>.sh script for proper operation.

Please star and watch this repo to be notified of updates. Thanks!

Spring Boot: Up and Running

The full code to accompany the book can be found here: Spring Boot: Up and Running code repo (branches for all chapters)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages