Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active October 4, 2017 04:36
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 garystafford/80a4e200d3a4d23aedea8e10020ea27e to your computer and use it in GitHub Desktop.
Save garystafford/80a4e200d3a4d23aedea8e10020ea27e to your computer and use it in GitHub Desktop.
hello-fluentd:
image: garystafford/hello-world:latest
networks:
- elk-demo
logging:
driver: fluentd
options:
tag: docker.{{.Name}}
env: SERVICE_NAME,DEPLOY_ENV
deploy:
placement:
constraints:
- node.role == worker
- node.hostname != ${WORKER_NODE_3}
replicas: 2
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
max_attempts: 3
delay: 5s
environment:
SERVICE_NAME: hello-fluentd
DEPLOY_ENV: ${DEPLOY_ENV}
LOGSPOUT: ignore
command: "java \
-Dspring.profiles.active=${DEPLOY_ENV} \
-Djava.security.egd=file:/dev/./urandom \
-jar hello-world.jar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment