Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
Shawn Duncan, Technical Architect
Digital Pulp
{
"require": {
"fathershawn/oauth2-formassembly": "^1.0"
}
}
The key section for dependency is the require section. Let's follow the chain...
{
"require": {
"php": "^5.6 || ^7.0",
"league/oauth2-client": "^2.0"
}
}
install
command has been executed with a lock file present.update
command has been executed, or after the install
command has been executed without a lock file present.drupal-composer/drupal-project
to verify Composer version.
install
command has been executed with a lock file present.update
command has been executed, or after the install
command has been executed without a lock file present.
{
"scripts": {
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
"robo": "@php scripts/robo/BallastRunner.php --ansi",
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
"composer robo setup:drupal",
"composer robo setup:prerequisites"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
"composer robo setup:drupal",
"composer robo setup:prerequisites"
]
},
}
composer require drupal/module_name
composer update drupal/core webflo/drupal-core-require-dev webflo/drupal-core-strict --with-all-dependencies
robo init
/**
* Prints the database connection info for use in SQL clients.
*/
public function connectSql() {
$ip = $this->getDockerMachineIp();
$port = $this->getSqlPort();
$this->io()->title('Database Info');
$this->io()->text("The Docker Machine host is: $ip");
$this->io()->text("Connect to port: $port");
$this->io()->text("Username, password, and database are all 'drupal'");
$this->io()->note("Both the ip and port can vary between re-boots");
}
on the command line:
robo connect:sql
-| scripts
BallastRunner.php
----| src
------| Commands
DeployCommands.php
DockerCommands.php
DockerMachineTrait.php
FrontEndTrait.php
RemoteRebuildCommands.php
SetupCommands.php
------| Utilities
Config.php
$collection->addTask(
$this->taskReplaceInFile("$root/setup/docker/docker-compose.yml")
->from('{site_shortname}')
->to($this->config->get('site_shortname'))
);
/**
* Builds separate artifact and pushes to remote as a branch.
*
* @param array $options
* Options from the command line or internal call.
*
* @return \Robo\Result
* The result of the final push.
*/
public function deployBranch(array $options = [
'branch' => InputOption::VALUE_REQUIRED,
'commit-msg' => InputOption::VALUE_REQUIRED,
'remote-branch' => NULL,
'remote' => NULL,
'build_id' => NULL,
]) {
$this->setConfig();
$this->setDeploymentOptions($options);
$this->say('Deploying to branch ' . $options['branch']);
$this->setDeploymentVersionControl($options);
$this->getDeploymentDependencies();
$this->getSanitizedBuild();
$this->setDeploymentCommit($options);
$this->setCleanMerge($options);
return $this->getPushResult($options);
}
code-quality:
image: digitalpulp/code-quality
working_dir: /var/www
volumes_from:
- deploy
front-end:
image: digitalpulp/front-end:codeship
working_dir: /var/www/docroot/themes/custom/YOUR_THEME
volumes_from:
- deploy
environment:
THEME_NAME: CHANGE_ME
deploy:
image: digitalpulp/cli:codeship
working_dir: /var/www
encrypted_env_file: env.encrypted
volumes:
- .:/var/www
environment:
DEPLOY_TARGET: CHANGE_ME
- name: pull_dependencies
tag: develop
service: deploy
command: composer install --no-dev --no-interaction --optimize-autoloader
- name: code_quality
service: code-quality
command: pre-commit.sh
- name: build_front
tag: develop
service: front-end
command: entrypoint.sh
- name: deploy
tag: develop
service: deploy
command: php scripts/robo/BallastRunner.php deploy
docker-compose-template
services:
web:
image: digitalpulp/nginx:stable-alpine-1.0.1
# image: digitalpulp/apache
depends_on:
- database
- php
volumes:
- .:/var/www
working_dir: /var/www/docroot/
environment:
VIRTUAL_HOST: {site_shortname}.dpulp
DOCROOT: /var/www/docroot
SERVER_NAME: {site_shortname}.dpulp
networks:
- internal
- proxy
.ahoy.yml
drush:
usage: Run drush commands within the drupal site. Follow `ahoy drush` with the drush command to be run.
cmd: docker-compose $(docker-machine config dp-docker) exec cli drush "$@"
cast-off:
usage: Launch the global tools needed for local development. Run this command once after you boot your computer.
cmd: |
php scripts/robo/BallastRunner.php boot && #make sure boot is successful
php scripts/robo/BallastRunner.php "boot:dns"
ahoy drush cache:rebuild
composer create-project digitalpulp/ballast your_project
I like my dev tool but I want to use Composer
composer create-project drupal-composer/drupal-project:8.x-dev your_project --stability dev --no-interaction
“Heeded my words not, did you? Pass on what you have learned. Strength, mastery.”
“But weakness, folly, failure also. Yes, failure most of all. The greatest teacher, failure is.”