Skip to content

Instantly share code, notes, and snippets.

@agocs
Created November 15, 2017 19:29
Show Gist options
  • Save agocs/27ee2ecd0ce57fb026bd2bc1492be057 to your computer and use it in GitHub Desktop.
Save agocs/27ee2ecd0ce57fb026bd2bc1492be057 to your computer and use it in GitHub Desktop.
LogDNA docker-compose
#Set the following env vars when you run docker-compose
# - INGESTION_KEY=the LogDNA ingestion key
# - APP_ENVIRONMENT=dev or qa or prod
# - LOGDNA_PORT= the logdna port you've created for Logspout
# Largely lifted from https://github.com/gliderlabs/logspout#using-logspout-in-a-swarm
version: "3"
services:
logspout:
image: gliderlabs/logspout:latest
networks:
- logging
volumes:
- /etc/hostname:/etc/host_hostname:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
- LOGDNA_INGESTION_KEY=${INGESTION_KEY}
- SYSLOG_TAG=${APP_ENVIRONMENT}
- SYSLOG_STRUCTURED_DATA="logdna@48950 tag=\"docker\""
command:
syslog+tls://syslog-a.logdna.com:${LOGDNA_PORT}
deploy:
mode: global
resources:
limits:
cpus: '0.20'
memory: 256M
reservations:
cpus: '0.10'
memory: 128M
networks:
logging:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment