This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
target: | |
# where to copy images to | |
registry: xxxx.dkr.ecr.us-east-1.amazonaws.com | |
# (optional) prefix all repositories with this name | |
# xxxx.dkr.ecr.us-east-1.amazonaws.com/hub/jippi/hashi-ui | |
prefix: "hub/" | |
# what repositories to copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
filename="repo_dockerhub.conf" | |
source_registry="" | |
destination_prefix="hub/" | |
destination_registry="xxxx.dkr.ecr.us-east-1.amazonaws.com/${destination_prefix}" | |
existing_repos=$(aws ecr describe-repositories | jq -r '.repositories[].repositoryName') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const log = require('bunyan').createLogger({name: 'ip-failover'}); | |
const axios = require('axios'); | |
const consul = require('consul')(); | |
const os = require("os") | |
const ip = require('ip'); | |
const argv = require('minimist')(process.argv.slice(2)); | |
const getConfigVariable = (envName, argvName, defaultValue) => { | |
if (envName in process.env) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "elasticsearch-email-logs" { | |
datacenters = ["production"] | |
update { | |
stagger = "120s" | |
max_parallel = 1 | |
} | |
constraint { | |
attribute = "${node.class}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := /bin/bash | |
.PHONY: phar clean help | |
.DEFAULT_GOAL := help | |
phar: ## Build a phar file | |
mkdir -p dist/ | |
rm -f dist/bownty-infra.phar | |
php build.php | |
chmod 0775 dist/bownty-infra.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Bownty\Foundation\Error; | |
use Bownty\Foundation\Environment; | |
use Cake\Console\ConsoleErrorHandler; | |
use Exception; | |
use NewRelic\Lib\NewRelic; | |
/** | |
* Error Handler for Cake console. Does simple printing of the | |
* exception that occurred and the stack trace of the error. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
newrelic_add_custom_parameter('APP_VERSION', Environment::getAppVersion()); | |
newrelic_add_custom_parameter('APP_ENV', Environment::get()); | |
if (php_sapi_name() !== 'cli') { | |
newrelic_add_custom_parameter('_get', json_encode($_GET)); | |
newrelic_add_custom_parameter('_post', json_encode($_POST)); | |
newrelic_add_custom_parameter('_files', json_encode($_FILES)); | |
newrelic_add_custom_parameter('_cookies', json_encode($_COOKIE)); | |
$serverVars = [ | |
'GEOIP_COUNTRY_CODE', 'GEOIP_CITY_NAME', 'HTTP_HOST', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scale for the job "content-themes" | |
job "content-themes" { | |
// For group "populator" | |
group "populator" { | |
// (required) The minimum nuber of tasks to run for this job | |
min_count = 0 | |
// (required) The maximum number of tasks to run for this job | |
max_count = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scale "bump" { | |
name = "hello" | |
type = "rabbitmq" | |
} | |
scale "derp" { | |
name = "world" | |
type = "derp" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "nomad-ui" { | |
type = "system" | |
region = "global" | |
datacenters = ["production", "stage"] | |
constraint { | |
attribute = "${meta.web}" | |
value = "1" | |
} |