Skip to content

Instantly share code, notes, and snippets.

View bendubuisson's full-sized avatar

Ben Dubuisson bendubuisson

  • Tempo
  • Wellington, NZ
  • 11:48 (UTC +13:00)
View GitHub Profile
$client = new EcsClient([
'version' => 'latest',
'region' => 'ap-southeast-2'
]);
$client->runTask([
'cluster' => self::CONFIG[$environment]['cluster'],
'launchType' => 'FARGATE',
'count' => 1,
'taskDefinition' => self::CONFIG[$environment]['taskDefinition'],
{
"executionRoleArn": "arnOfTaskExecutionRole",
"containerDefinitions": [
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/run-app",
"awslogs-region": "aws_region",
"awslogs-stream-prefix": "ecs"
@bendubuisson
bendubuisson / PublishRelatedFilesTrait.php
Last active August 30, 2017 08:09
Trait for non versioned SilverStripe 4 DataObjects. Files associated to DataObjects that are non-versioned do not get published by default.
<?php
namespace MyProject\Traits;
use SilverStripe\Assets\Image;
/**
* Class PublishRelatedFilesTrait
* @package MyProject\Traits
*/