Package: axl-template
Template scriptsA set of scaffolding tools for use at Axelerant. Currently, it supports:DrupalLandoGitLabRequirementsYou need Python 3.7+ and pip to install and use this script. Followthese instructionsto install pip if you don't already have it.The script relies on certain developer tools to be available when running.git - To initialize the project as a repository.composer - To download the dependencies. If composer is not present, the dependencies don't get downloaded.Alternatively, you can use Docker to run this command. See the section below on usage with Docker for more information.InstallationInstall this script viapip(orpip3). You can use the command to upgrade the command as well.pip3install--upgradeaxl-templateUsage with Docker(alternate)Docker support is experimental right now and may throw errors. If you face issues with Docker support, please report an issue. To runinit-drupalwith Docker, run this command (for bash):dockerrun-v$(pwd):/workdiraxelerant/template:latest<init-drupaloptions>TheENTRYPOINTis set toinit-drupaland you can override it if you want to run other commands.dockerrun-v$(pwd):/workdir-einit-landoaxelerant/template:latest<init-landooptions>You can set aliases so that you don't have to type these commands every time.aliasinit-drupal='docker run -v $(pwd):/workdir axelerant/template'aliasinit-lando='docker run -v $(pwd):/workdir -e init-lando axelerant/template'Usage with whalebrewThe Docker image works withwhalebrew. You can install the Docker image using the following:whalebrewinstallaxelerant/templateYou can then use the commandinit-drupalas normal. Whalebrew takes care of the Docker syntax for you.Updating with DockerDocker images are tagged along with each tagged version. ThelatestDocker tag will point to the latest tagged release. You can update the Docker image on your machine similar to any other Docker machine.dockerpullaxelerant/templateinit-drupal(Requires Python 3.7+)Scaffold a Drupal codebase in a subdirectory.Usage for init-drupalUsage:init-drupal[OPTIONS]NAMEScaffoldaDrupalsitetemplateCreateaDrupalsitetemplatewithNAME.WhereNAMEisthenameofyourapplicationpackage(e.g.,axelerant/site)Options:--directoryDIRECTORYDirectorywherethefilesshouldbesetup(e.g.,drupal).Thedirectorywillbeemptied.Thedefaultisbasedonthespecifiedname.--descriptionTEXTDescriptionofthepackage-core,--core-package[core|recommended]Selectthecorepackage--coreSelectthedrupal/corepackage--recommendedSelectthedrupal/core-recommendedpackage--core-versionTEXTDrupalcoreversion[default:^9.4.0]-m,-p,--module,--packageCOMPOSER_PACKAGESpecifyDrupalmodulenamesorPHPpackages--docrootPATHThedocumentroot--cache[redis|memcache]Addacacheservice--landoAddLandosupport--gitlabAddGitLabsupport-f,--forceForcedeletethetargetdirectoryifitexists--helpShowthismessageandexit.Exampleinit-drupalaxelerant/site--cacheredis--core-madmin_toolbarThe above command will generate a composer.json and in adrupaldirectory and runcomposer install. It will use the regulardrupal/corepackage along with the Redis module and few other packages. Finally, it will add the admin_toolbar module as well.init-lando(Requires Python 3.7+)Scaffold Lando configuration for a Drupal site in the current directory.Usage for init-landousage:init-landoNo options are required. The tool reads the composer.json file and sets up the Lando configuration accordingly. It also sets up asettings.lando.phpfile to include Lando specific database and caching configuration.Lando support can also be added when runninginit-drupalby passing the--landooption.init-gitlab(Requires Python 3.7+)Scaffold GitLab configuration for a Drupal site in the current directory.Usage for init-gitlabusage:init-gitlabNo options are required. The tool reads the composer.json file and sets up the GitLab CI configuration accordingly. It also enables loadingsettings.local.phpfromsettings.phpso that Drupal can use proper database configuration during a CI run.These files are created byinit-gitlabin the.gitlabdirectory and copied by a shell script (ci.sh). The.gitlab-ci.ymlfile is created in the project root directly.GitLab support can also be added when runninginit-drupalby passing the--gitlaboption.