New database options (MySQL, Postgres, MariaDB)

New database options (MySQL, Postgres, MariaDB)

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:

Image loading...Services 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.

Image loading...Buddy 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.

Tip
If you want to upload a fresh instance of the database, make sure to run the execution with the 'Clear cache' flag. Image loading...Execution 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.

Image loading...Defining 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!

Warning
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.
Jarek Dylewski

Jarek Dylewski

Customer Support

A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.

Sep 6th 2018
Last update: Sep 21st 2020
Share