ironstar-io / tokaido

Zero-conf Drupal Local Development Environments with Docker
https://tokaido.io
BSD 3-Clause "New" or "Revised" License
57 stars 10 forks source link

implements support for custom template URLs #241

Closed ironmike-au closed 4 years ago

ironmike-au commented 4 years ago

This PR adds support for users to define their own custom templates when using tok new.

To define your own templates, add a customTemplates URL To ~/.tok/global.yml, such as:

customTemplates: https://example.com/templates.yaml

The templates YAML file has the follow the same pattern as the official templates.yaml file but you now define a package_url instead of package_filename to specify a full path to your own package. For example:

templates:
  - name: "custom-image"
    drupal_version: 9
    package_url: "https://example.com/drupal9-example-org.tar.gz"
    maintainer: my-organisation
    description: "a custom image only available to people who know the url"
    post_up_commands:
      - drush site-install -y minimal

The package_url needs to be publicly accessible and the package itself should be the root of a ready-to-start package. See tokaido-drupal-package-builder and it's CircleCI file for examples of how to build these packages.