Download the PHP package axelerant/db-docker without Composer

On this page you can find all versions of the php package axelerant/db-docker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package db-docker

db-docker

Generate a Database as an image

Introduction

This tool was written for Axelerant specific processes but can be used generally by overriding certain configuration. By default, you wouldn't be able to use this plugin if you cannot access Axelerant's GitLab repository. You may use it with your own Docker image registry or even with Docker Hub.

Prerequisites

Optional requirements (only for default workflow)

By default, this plugin generates the image with name prefixed with Axelerant's Docker registry. The below requirements apply if you don't override the image name using configuration in composer.json.

Installation

Install with composer into any Drupal project.

Usage

Options may be specified using the command line or by specifying them in the extra section in your composer.json file. See the section below on Configuration for more details.

Warning: The above usage is generated by running composer db-docker --help and is generated by composer. Some options such as --no-plugins are not compatible. The option --no-plugins tells composer not to load any plugins, which means that db-docker won't be loaded at all.

Examples

To let the plugin guess defaults, build the image, and push it.

To explicitly specify a SQL file to build the image.

Configuration

The plugin also supports configuration via composer.json extra section.

These options work the same way as the options available via the command line. Option values specified on the command line take precedence followed by the options in the extra section of composer.json. Finally, values are guessed as described below.

Image details

By default, the image name and tag will be guessed using the method described below in the Default Options section. You can override both of them using the docker-image-name and docker-tag settings in the configuration in composer.json as shown above. Additionally, you may also specify the docker-tag via the command line.

Base image

You can use the docker-base configuration to specify the base image to use to build the database image. When not specified, the default image used is Bitnami's MariaDB 10.4 image with default access details which is compatible with Lando's Drupal 8 recipe. You may override this to fit in your workflow as desired.

The base image details cannot be customized from the command line. They must be specified via the composer.json's extra section.

DDEV base image

The defaults for docker-base depend on the value of base-flavor setting. By default, the base-flavor is set to bitnami and the defaults are set as above. However, if base-flavor is ddev, the defaults change to the following:

These are the defaults required for building database images compatible for DDEV.

Default options

The plugin tries to guess most values for input to correctly select the source, build the image, and push it.

Determining the image name

The image name can be specified using the docker-image-name in composer.json as described above. If not specified (or set to "auto"), the image name is constructed from the git repository.

The image name is determined based on the git repository's origin remote (overridable using the --git-remote option). The remote URL should be a Git URL (not a HTTP URL) of type [email protected]:<group>/<project>.git. For this, it would determine the image name registry.gitorious.xyz/<group>/<project>/db. See the next section for the image tag.

It's important to note that the image name is constructed only for Axelerant Gitlab repositories. If you want to use another Docker registry (such as Docker Hub or Quay.io), please use the option in composer.json to specify the proper name.

Determining the image tag

The image tag, unless specified with the --docker-tag option, is assumed to be the current branch name. If the current branch is master, the image tag is used as latest.

Determining the database source

These database sources are supported: file, lando, ddev, and drush. The source can be explicitly specified using the --db-source option. If not specified, the following rules are used to determine the source.

In case the source is lando, ddev, or drush, the drush sql:dump command is used to obtain the SQL file. If the source is lando or ddev, then the drush command is executed inside the relevant container like so: lando drush ... or ddev drush ....

Reporting problems

If you see a bug or an improvement, create a pull request. For support, raise a request on Axelerant Slack #internal-support channel.


All versions of db-docker with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^1.1 || ^2.0
cypresslab/gitelephant Version ^4.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package axelerant/db-docker contains the following files

Loading the files please wait ....