Skip to content

Commit

Permalink
add log expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
sailorgeoffrey committed Oct 15, 2018
1 parent 04db2f2 commit 58d1bb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ The following parameters are optional and will default to these values:
container_health_timeout=5
container_health_retries=5
container_health_start_period=90
dockerfile_path="."
log_retention_days=7

You may also set env vars by prefixing the var name with env_

Expand Down
1 change: 1 addition & 0 deletions bin/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ aws elbv2 create-rule \

echo "Creating log group..."
aws logs create-log-group --log-group-name /ecs/${name}-${environment} || true
aws logs put-retention-policy --log-group-name /ecs/${name}-${environment} --retention-in-days ${log_retention_days}

echo "Creating Task Definition with temporary httpd image"

Expand Down
2 changes: 2 additions & 0 deletions bin/rc_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ rc_help() {
echo "container_health_retries=5"
echo "container_health_start_period=90"
echo "dockerfile_path=\".\""
echo "log_retention_days=7"
echo
echo "You may also set env vars by prefixing the var name with env_"
echo "env_SPRING_PROFILES_ACTIVE=production"
Expand Down Expand Up @@ -84,6 +85,7 @@ load_rc () {
[ -z "$container_health_retries" ] && container_health_retries=5
[ -z "$container_health_start_period" ] && container_health_start_period=90
[ -z "$dockerfile_path" ] && dockerfile_path="."
[ -z "$log_retention_days" ] && log_retention_days=7
true

}

0 comments on commit 58d1bb6

Please sign in to comment.