Last active
January 8, 2021 00:20
-
-
Save miguelmota/18444fd3f57ff688fb44a394d394b536 to your computer and use it in GitHub Desktop.
Docker log to AWS CloudWatch using awslogs logging driver
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
services: | |
image: postgres | |
web: | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: us-east-1 | |
awslogs-group: MyGroup | |
awslogs-create-group: "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
docker run \ | |
--log-driver=awslogs \ | |
--log-opt awslogs-region=us-east-1 \ | |
--log-opt awslogs-group=MyGroup \ | |
--log-opt awslogs-create-group=true \ | |
postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment