Last active
September 7, 2017 01:47
-
-
Save garystafford/3ba79733a1f212f92d42e09416575c65 to your computer and use it in GitHub Desktop.
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
# Hello World Service Stack | |
# DTR_URL: Docker Trusted Registry URL | |
# IMAGE: Docker Image to deply | |
# ENVIRONMENT: Environment to deploy into | |
version: '3.2' | |
services: | |
hello-world: | |
image: ${DTR_URL}/${IMAGE} | |
deploy: | |
placement: | |
constraints: | |
- node.role == worker | |
- node.labels.environment == ${ENVIRONMENT} | |
replicas: 4 | |
update_config: | |
parallelism: 4 | |
delay: 10s | |
restart_policy: | |
condition: any | |
max_attempts: 3 | |
delay: 10s | |
logging: | |
driver: fluentd | |
options: | |
tag: docker.{{.Name}} | |
env: SERVICE_NAME,ENVIRONMENT | |
environment: | |
SERVICE_NAME: hello-world | |
ENVIRONMENT: ${ENVIRONMENT} | |
command: "java \ | |
-Dspring.profiles.active=${ENVIRONMENT} \ | |
-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