{"id":20838481,"url":"https://github.com/reload/docker-db-datadir-builder","last_synced_at":"2025-12-26T07:48:57.769Z","repository":{"id":40080296,"uuid":"143411888","full_name":"reload/docker-db-datadir-builder","owner":"reload","description":"Google cloud build of mariadb datadirs for our database dumps","archived":false,"fork":false,"pushed_at":"2022-12-23T03:00:34.000Z","size":34,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-18T23:17:52.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reload.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-03T10:07:52.000Z","updated_at":"2020-06-09T17:16:13.000Z","dependencies_parsed_at":"2023-01-30T17:30:49.026Z","dependency_job_id":null,"html_url":"https://github.com/reload/docker-db-datadir-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdocker-db-datadir-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdocker-db-datadir-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdocker-db-datadir-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdocker-db-datadir-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reload","download_url":"https://codeload.github.com/reload/docker-db-datadir-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243196618,"owners_count":20251857,"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":[],"created_at":"2024-11-18T01:10:27.830Z","updated_at":"2025-12-26T07:48:57.698Z","avatar_url":"https://github.com/reload.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datadir builder\nA Google Cloud Build build of our MariaDB datadirs.\n\nThe datadir builder is triggered at the end of our db-dump worker runs via a helper.\n\nYou can also build datadirs locally.\n\n## Local builds\n\n### Using make\nThe easiest way to build datadirs locally is by using the `make datadir` target, run it like so (replacing the `db-data` and `db-datadir` tags with the appropriate ones):\n```bash\nsource=eu.gcr.io/reloaddk-data/db-data:reloaddk-latest destination=eu.gcr.io/reloaddk-data/db-datadir:reloaddk-latest init=standard-drupal8 make datadir\n```\n\n*Notice:* You should have a local gcloud configured with access to pulling the required images.\n\n### Using Cloud Build locally\nTo test the cloud build using Google Cloud SDK locally, you can use a tool called `cloud-build-local`. [Read how to install here](https://cloud.google.com/cloud-build/docs/build-debug-locally#install_the_local_builder)).\n\nRun the local builder like so (replace the `_BASENAME` value with the appropriate project name):\n```bash\ncloud-build-local \\\n  --no-source \\\n  --dryrun=false \\\n  --config cloudbuild-local-trigger.yaml \\\n  --substitutions=_BASENAME=\"ddsdk\",_POST_IMPORT_SCRIPT=\"standard-drupal8\"\n```\n\n### Checking results\nAfter a successful run you should now have a working datadir image in your local image cache. Run `docker images` to check.\n\n## Cloud builds\nYou can trigger an **actual** cloud build of a datadir like so (replace the `_BASENAME` value with the appropriate project name):\n```bash\ngcloud --project=reloaddk-data builds submit \\\n  --no-source \\\n  --async \\\n  --timeout \"60m\" \\\n  --config cloudbuild-local-trigger.yaml \\\n  --substitutions=_BASENAME=\"ddsdk\",_POST_IMPORT_SCRIPT=\"standard-drupal8\"\n```\nSee [gcr.reload.dk/your-reloaddk-username](http://gcr.reload.dk/) for a list of current source images.\n\nAfter the build you should be able to see the datadir image in GCR [here](https://console.cloud.google.com/gcr/images/reloaddk-data/EU/db-datadir?project=reloaddk-data).\n\n## TODO\n- Consider how to support custom init sql-scripts (right now you have to go with our standard drupal7 / drupal8 reset.sql scripts). Maybe let the user pass in an url where we could fetch the sql from?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freload%2Fdocker-db-datadir-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freload%2Fdocker-db-datadir-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freload%2Fdocker-db-datadir-builder/lists"}