Here you can find super simple redis
based circular-buffer implementation written on golang
:
package main
import (
"fmt"
{ | |
"executions": [ | |
{ | |
"id": 132, | |
"status": "succeeded", | |
"project": "TEST-Sylvain", | |
"executionType": "user", | |
"user": "sthirard", | |
"date-started": { | |
"unixtime": 1560946609000, |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) | |
func main() { |
delete_old_versions: | |
aws ecs list-task-definitions --sort=DESC \ | |
| grep -Eo $(YourSrvc)':[0-9]+' \ | |
| tail -n +2 \ | |
| while read v; do aws ecs deregister-task-definition --task-definition=$$v; done |
deploy: | |
aws ecs update-service --cluster=$(YourCluster) --service=$(YourSrvc) --task-definition=`\ | |
aws ecs register-task-definition --cli-input-json file://AWSTaskDefinition.json \ | |
| grep -Eo $(YourSrvc)':[0-9]+' \ | |
` |
build_and_push_image: | |
docker build \ | |
-t $(YourUserID).dkr.ecr.us-east-1.amazonaws.com/$(YourImage):$(YourTag) \ | |
-f deploy/Dockerfile . | |
eval $(shell aws ecr get-login --no-include-email) | |
docker push $(YourUserID).dkr.ecr.us-east-1.amazonaws.com/$(YourImage):$(YourTag) |
{ | |
"containerDefinitions": [ | |
{ | |
"name": "$(YourServiceName)", | |
"image": "$(YourUserID).dkr.ecr.us-east-1.amazonaws.com/$(YourImage):$(YourTag)", | |
"portMappings": [ | |
{ | |
"protocol": "tcp", | |
"hostPort": 8080, | |
"containerPort": 8080 |