{"id":19140260,"url":"https://github.com/drevops/mariadb-drupal-data","last_synced_at":"2025-05-06T23:16:36.285Z","repository":{"id":47736956,"uuid":"238193722","full_name":"drevops/mariadb-drupal-data","owner":"drevops","description":"🗄️ MariaDB Docker image with enclosed data","archived":false,"fork":false,"pushed_at":"2025-04-11T11:09:57.000Z","size":85,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T23:16:26.480Z","etag":null,"topics":["database","docker","drupal","mariadb","mysql","persistent"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drevops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"drevops","patreon":"drevops"}},"created_at":"2020-02-04T11:50:05.000Z","updated_at":"2025-04-11T11:10:00.000Z","dependencies_parsed_at":"2024-04-19T05:39:28.968Z","dependency_job_id":"1ba11a02-338d-435b-96cd-adf722bf91e6","html_url":"https://github.com/drevops/mariadb-drupal-data","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drevops%2Fmariadb-drupal-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drevops%2Fmariadb-drupal-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drevops%2Fmariadb-drupal-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drevops%2Fmariadb-drupal-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drevops","download_url":"https://codeload.github.com/drevops/mariadb-drupal-data/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782835,"owners_count":21803410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","docker","drupal","mariadb","mysql","persistent"],"created_at":"2024-11-09T07:16:57.356Z","updated_at":"2025-05-06T23:16:36.248Z","avatar_url":"https://github.com/drevops.png","language":"Shell","funding_links":["https://github.com/sponsors/drevops","https://patreon.com/drevops"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"\" rel=\"noopener\"\u003e\n  \u003cimg width=200px height=200px src=\"https://placehold.jp/000000/ffffff/200x200.png?text=MariaDB+Drupal+Data\u0026css=%7B%22border-radius%22%3A%22%20100px%22%7D\" alt=\"Mariadb Drupal data logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eMariaDB data container for Drupal with database captured as Docker layers.\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![GitHub Issues](https://img.shields.io/github/issues/drevops/mariadb-drupal-data.svg)](https://github.com/drevops/mariadb-drupal-data/issues)\n[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/drevops/mariadb-drupal-data.svg)](https://github.com/drevops/mariadb-drupal-data/pulls)\n[![CircleCI](https://circleci.com/gh/drevops/mariadb-drupal-data.svg?style=shield)](https://circleci.com/gh/drevops/mariadb-drupal-data)\n[![codecov](https://codecov.io/gh/drevops/mariadb-drupal-data/graph/badge.svg?token=JYSIXUF6QX)](https://codecov.io/gh/drevops/mariadb-drupal-data)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/drevops/mariadb-drupal-data)\n![LICENSE](https://img.shields.io/github/license/drevops/mariadb-drupal-data)\n![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot)\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/drevops/mariadb-drupal-data?logo=docker)](https://hub.docker.com/r/drevops/mariadb-drupal-data)\n![amd64](https://img.shields.io/badge/arch-linux%2Famd64-brightgreen)\n![arm64](https://img.shields.io/badge/arch-linux%2Farm64-brightgreen)\n\n\u003c/div\u003e\n\n## How it works\n\nUsually, MariaDB uses data directory specified as a Docker volume that is\nmounted onto host: this allows retaining data after container restarts.\n\nThe MariaDB image in this project uses custom location `/home/db-data` (not\na Docker volume) to store expanded database files. These files then can be\ncaptured as a Docker layer and stored as an image to docker registry.\n\nImage consumers download the image and start containers with instantaneously\navailable data (no time-consuming database imports required).\n\nTechnically, the majority of the functionality is relying on upstream [`uselagoon/mariadb-drupal`](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb-drupal/10.11.Dockerfile) Docker image.\n[Entrypoint script](entrypoint.bash)) had to be copied from [upstream script](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/entrypoints/9999-mariadb-init.bash) and adjusted to support custom data directory.\n\n## Use case\n\nDrupal website with a large database.\n\n1. CI process builds a website overnight.\n2. CI process captures the latest database as a new Docker layer in the database image.\n3. CI process tags and pushes image to the Docker registry.\n4. Website developers pull the latest image from the registry and build site locally.\n   OR\n   Subsequent CI builds pull the latest image from the registry and build site.\n\nWhen required, website developers restart docker stack locally with an already\nimported database, which saves a significant amount of time for database\nimports.\n\n## Seeding image with your database\n\n1. Download the `seed.sh` script from this repository:\n```shell\ncurl -LO https://github.com/drevops/mariadb-drupal-data/releases/latest/download/seed.sh\nchmod +x seed.sh\n```\n2. Run the script with the path to your database dump and the image name:\n\n```shell\n./seed.sh path/to/db.sql myorg/myimage:latest\n\n# with forced platform\nDOCKER_DEFAULT_PLATFORM=linux/amd64 ./seed.sh path/to/db.sql myorg/myimage:latest\n\n# for multi-platform image\nDESTINATION_PLATFORMS=linux/amd64,linux/arm64 ./seed.sh path/to/db.sql myorg/myimage:latest\n\n# with a custom base image (e.g., canary)\nBASE_IMAGE=drevops/mariadb-drupal-data:canary ./seed.sh path/to/db.sql myorg/myimage:latest\n```\n\nNote that you should already be logged in to the registry as `seed.sh` will be pushing an image as a part of `docker buildx` process.\n\n## Maintenance\n\n### Running tests\n\n    tests/bats/node_modules/.bin/bats tests/bats/image.bats --tap\n    tests/bats/node_modules/.bin/bats tests/bats/seed.bats --tap\n\n### Publishing\n\nThis image is built and pushed automatically to DockerHub:\n1. For all commits to `main` branch as `canary` tag.\n2. For releases as `:\u003cversion\u003e` and `latest` tag.\n3. For `feature/my-branch` branches as `feature-my-branch` tag.\n\nVersions are following versions of the [upstream image](https://hub.docker.com/r/uselagoon/mariadb-drupal/tags) to ease maintenance.\n\n---\n_This repository was created using the [Scaffold](https://getscaffold.dev/) project template_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrevops%2Fmariadb-drupal-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrevops%2Fmariadb-drupal-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrevops%2Fmariadb-drupal-data/lists"}