WTF is kubernetes?
- monitors containers
- Deployment of containers
- Handles communication b/n containers
Kubernetes could be used to use docksal to manage Production level hosting
#!/usr/bin/env bash | |
## Runs phpcbf to clean up code-sniffer errors. | |
## In composer.json: | |
## "require": { | |
## . "drupal/coder": "^8.2" | |
## } | |
#!/usr/bin/env sh | |
export DOCKSAL_VERSION=v1.3.1 | |
docker_config="$HOME/.docker" | |
docksal_config="$HOME/.docksal" | |
echo "Removing the VM just to be sure" | |
fin vm remove | |
if [ -d "$docker_config" ]; then |
#!/usr/bin/env bash | |
## Creates a new docker database image using the backup of the live environment. | |
## | |
## Usage: fin update-database-image | |
# Abort if anything fails | |
set -e | |
SITE_DIRECTORY="default" |
<?php | |
function updateProductCategoryReference($product_id, $new_cat_tid) { | |
$product = new stdClass(); | |
$product->product_id = $product_id; | |
$product->type = 'product'; | |
$product->field_product_category[LANGUAGE_NONE][]['tid'] = $new_cat_tid; | |
$transaction = db_transaction(); | |
try { | |
field_attach_presave('commerce_product', $product); | |
field_attach_update('commerce_product', $product); |
<?php | |
$domains = [ | |
0 => [ | |
'domain_id' => 7, | |
], | |
1 => [ | |
'domain_id' => 7, | |
], | |
2 => [ | |
'domain_id' => 7, |
███ OS & BASICS | |
Darwin vulcan 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64 | |
Mac OS X 10.12.4 | |
fin version: 1.10.0 | |
Mode: VirtualBox VM | |
███ INSTANCES | |
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS | |
docksal * virtualbox Running tcp://192.168.64.100:2376 v17.04.0-ce | |
███ DOCKER | |
DOCKER_HOST: tcp://192.168.64.100:2376 |
Date: 2017-05-07
#!/usr/bin/env bash | |
# Abort if anything fails | |
set -e | |
SITE_DIRECTORY="default" | |
DOCROOT_PATH="${PROJECT_ROOT}/${DOCROOT}" | |
SITEDIR_PATH="${DOCROOT_PATH}/sites/${SITE_DIRECTORY}" | |
ARTIFACT_PATH="${PROJECT_ROOT}/artifacts" |
<?php | |
$form[$bundle . '_fieldset']['markup'] = [ | |
'#title' => t("Generated Markup"), | |
'#prefix' => '<xmp id="snippet-container">', | |
'#markup' => _my_custom_module_get_markup($bundle), | |
'#suffix' => '</xmp>', | |
]; | |