Skip to content

Instantly share code, notes, and snippets.

@macedd
Created February 6, 2019 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macedd/49dbe0c32e93d38a9b2c6651200dcf77 to your computer and use it in GitHub Desktop.
Save macedd/49dbe0c32e93d38a9b2c6651200dcf77 to your computer and use it in GitHub Desktop.
AWS ECS / Beanstalk Docker syslog LogDriver
{
"AWSEBDockerrunVersion": "1",
"dnsServers": [ "8.8.8.8" ],
"Volumes": [
{
"HostDirectory": "/var/app/current",
"ContainerDirectory": "/usr/src/app"
},
{
"HostDirectory": "/tmp",
"ContainerDirectory": "/tmp"
}
],
"Ports": [
{
"ContainerPort": "80"
}
],
"LogConfiguration": {
"logDriver": "syslog",
"options": {
"tag": "myapp.{{.ID}}"
}
}
}
# /etc/rsyslog.d/31-docker-myapp.conf
:syslogtag, contains, "myapp." /var/log/docker-myapp.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment