!Ref ResourceName
{ "Fn::Ref": "ResourceName" }
!GetAtt ResourceName.AttributeName
{ "Fn::GetAtt": [ "ResourceName", "AttributeName" ] }
!Sub "something:with:${Variable}"
{ "Fn:Sub": "something:with:${Variable}" }
#!/bin/bash | |
set -x | |
docker stop $(docker ps -a -q) | |
docker system prune --volumes |
{ | |
"query": { | |
"bool": { | |
"filter": [ | |
{ "term": { "field1": "foo" } }, | |
{ "term": { "field2": "bar" } } | |
] | |
} | |
} | |
} |
const secondThing = { term: { field2: 'bar' } }; | |
const firstThing = { term: { field1: 'foo' } }; | |
const filter = [ firstThing, secondThing ]; | |
const bool = { filter }; | |
const query = { bool }; | |
const body = { query }; | |
const params = { | |
index: 'your-index', | |
body | |
}; |
test: | |
image: "${APP_IMAGE}" | |
links: | |
- es | |
- redis | |
environment: | |
- NODE_ENV=test | |
- ES_HOST=es | |
- REDIS_HOST=redis |
FROM mhart/alpine-node:8.9.3 | |
ADD . /app | |
WORKDIR /app | |
RUN apk --no-cache add python make gcc g++ git; \ | |
npm install; \ | |
apk --purge del python make gcc g++; | |
CMD [ "node", "src/main" ] |
version: 0.1 | |
phases: | |
pre_build: | |
commands: | |
- $(aws ecr get-login --region $AWS_REGION) | |
- pip install docker-compose | |
build: | |
commands: | |
- docker build -t $APP_IMAGE . |
# Stack to create EC2 instances for ECS cluster. | |
# | |
# aws cloudformation deploy \ | |
# --stack-name app-cluster-prod \ | |
# --template-file ./aws-cluster-stack.yaml \ | |
# --parameter-overrides \ | |
# KeyName=DEFAULT \ | |
# SecurityGroups=group1,group2 \ | |
# ImageId=ami-123456 \ | |
# InstanceType=c5.large \ |
# App ship-it stack with ECS, CodeBuild & CodePipeline. | |
# | |
# aws cloudformation deploy \ | |
# --stack-name myapp-prod \ | |
# --template-file ./aws-ship-it-stack.yaml \ | |
# --parameter-overrides \ | |
# KeyName=<KEY_NAME> \ | |
# GitHubAuthToken=<ACCESS_TOKEN> \ | |
# RepoOwner=<OWNER_NAME> \ | |
# RepoName=<REPO_NAME> \ |
FROM mhart/alpine-node:8.9.1 | |
ADD . /app | |
WORKDIR /app | |
RUN apk --no-cache add python make gcc g++ git; \ | |
npm install; \ | |
apk --purge del python make gcc g++; | |
ENTRYPOINT [ "node" ] |