New database options (MySQL, Postgres, MariaDB)

New database options (MySQL, Postgres, MariaDB)

September 6, 2018

Buddy is a smart tool that lets you build and deploy your web projects. Before the application is deployed to the server, however, it is first tested in preconfigured Docker containers. Some of the tests, e.g. integration, E2E or Selenium, require a fully operational application with things like a database and session storage.

Buddy supports this functionality with microservices activated in build actions:

Services tabServices tab

In response to growing demand from our clients, we have added database seeding for the 3 most popular database services: MySQL, Postgres, and MariaDB.

How database seeding works

First, you need to upload the file with SQL dump (.sql, .sql.gz). You can do it either by adding the file to the repo (not recommended), or by uploading it to the pipeline's Filesystem as a static file. Once the file is in the Filesytem, it's enough that you point to it in the service details.

Buddy filesystemBuddy filesystem

How it works upon loading the database

Buddy will load the database from the dump every time the build is triggered. If you wish, you can speed up the builds by checking 'Cache database between executions' in the service options. This way the database will be loaded from the dump only on the first execution.

If you want to upload a fresh instance of the database, make sure to run the execution with the 'Clear cache' flag.

Execution detailsExecution details

Define the default database

From now on, you can also define the default name of the database that will be created in the beginning. If you did specify the SQL dump in the pipeline, Buddy will import the data from that database. Otherwise, it will create an empty database using the default name.

Defining the database detailsDefining the database details

What's next

In the future, it will be possible to define custom services using docker-compose – a feature that will let you configure even the most advanced use cases. Stay tuned for more info!

Buddy is 100% customer driven. If there’s a feature or integration you miss, let us know in the comments below or directly at support@buddy.works.

Share

About the Author
Alexander Kus

Alexander Kus

Customer Success Manager

A story-teller and conversation-lover, Alexander decided to invest his skills to help his friends at Buddy transform the cold language of patch notes into exciting narratives. Also: an avid gamer, hip-hop DJ, Liverpool FC fan, absentminded husband, and the father of two.

Buddy Makes Developers Happier

You use lots of tools to get web & app development done. Buddy creates more time in your day by helping you automate those tools.

Sign up for free with