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
#!/usr/bin/env bash | |
VERSION=3.3.0.1492-linux | |
echo "Downloading sonar-scanner....." | |
rm -rfv /tmp/sonar-scanner-cli-$VERSION.zip | |
wget -P /tmp/ -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$VERSION.zip | |
echo "Download completed." | |
echo "Unziping downloaded file..." | |
unzip /tmp/sonar-scanner-cli-$VERSION.zip -d /tmp/ |
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
#!/usr/bin/env bash | |
VERSION=3.3.0.1492-linux | |
echo "Downloading sonar-scanner....." | |
rm -rfv /tmp/sonar-scanner-cli-$VERSION.zip | |
wget -P /tmp/ -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$VERSION.zip | |
echo "Download completed." | |
echo "Unziping downloaded file..." | |
unzip -q /tmp/sonar-scanner-cli-$VERSION.zip -d /tmp/ |
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
diff --git a/.dockerignore b/.dockerignore | |
new file mode 100644 | |
index 0000000..b2ef806 | |
--- /dev/null | |
+++ b/.dockerignore | |
@@ -0,0 +1 @@ | |
+cdk.out | |
\ No newline at end of file | |
diff --git a/.gitignore b/.gitignore | |
index 5bd9be8..8600814 100644 |
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
#!/usr/bin/env node | |
import 'source-map-support/register'; | |
import cdk = require('@aws-cdk/core'); | |
import ecs = require("@aws-cdk/aws-ecs"); | |
import ecsPatterns = require("@aws-cdk/aws-ecs-patterns"); | |
export class WebStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
this.createECSCluster(); |
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
Resources: | |
ecsCluster15812518: | |
Type: AWS::ECS::Cluster | |
Metadata: | |
aws:cdk:path: WebStack/ecsCluster/Resource | |
ecsClusterVpcFF32B42F: | |
Type: AWS::EC2::VPC | |
Properties: | |
CidrBlock: 10.0.0.0/16 | |
EnableDnsHostnames: true |
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
version: '3' | |
services: | |
php: | |
build: . | |
volumes: | |
- ~/.composer-docker/cache:/root/.composer/cache:delegated | |
- ./:/app:delegated | |
ports: | |
- '8080:80' | |
environment: |
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 | |
# Resize disk for AWS Cloud9 | |
# https://docs.aws.amazon.com/cloud9/latest/user-guide/move-environment.html#move-environment-resize | |
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB. | |
SIZE=${1:-20} | |
# Get the ID of the environment host Amazon EC2 instance. | |
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id) |
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
#!/usr/bin/env bash | |
# Sometimes we create a lot of S3 Bucket with similar names. | |
# The command below will find all buckets in the region with pattern `bucket_pattern`, | |
# then empty the bucket and then delete the bucket. | |
BUCKET_PATTERN=bucket_pattern | |
aws s3api list-buckets |\ | |
jq -r '.Buckets[].Name' |\ | |
grep $BUCKET_PATTERN |\ | |
xargs -n 1 -I {} sh -c 'aws s3 rm s3://{} --recursive && aws s3 rb s3://{}' |
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
#!/usr/bin/env bash | |
# Load environment variables from 1password | |
# To execute this script, execute the command below. | |
# source 1passwordtoenv.sh 'Name of the item' | |
ITEM_NAME=$1 | |
# Signin | |
eval $(op signin) | |
# Load environment variables |
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
#!/usr/bin/env bash | |
# Requirements | |
# - AWS | |
# - jq | |
# Variables | |
PROFILE= | |
DISTRIBUTION_ID= | |
PATHS="/*" |