Skip to content

Automate MariaDB Docker Startup When Launching Spring Boot App #4

@sdley

Description

@sdley

Description

Currently, the MariaDB container must be started manually before running the Spring Boot application. The preferred solution is for the Spring Boot app to automatically start the MariaDB container (using Docker) if it's not already running. This should remove any manual steps required from users or contributors, ensuring a seamless startup experience.

Expected Behavior

  • When starting the Spring Boot application (via Maven, Gradle, or Java), if the MariaDB Docker container is not running, it should be detected and started automatically.

  • There should be no need for a separate docker-compose up -d mariadb or similar manual command.

  • The solution should work cross-platform and be robust for local development and onboarding.

Possible Solutions

  • Investigate using Spring Boot 3.1+ Docker Compose integration to automate container lifecycles, or

  • Explore using a project like MariaDB4j for embedded MariaDB in Java, or

  • Provide a script/wrapper that checks and starts the container before launching the app.​

  • Document any new commands or requirements in the README.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions