Skip to content

Instantly share code, notes, and snippets.

@h-a-t-zz
Last active September 26, 2017 18:38
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 h-a-t-zz/eafbb19d7ce46c4ee4a541df018a5f37 to your computer and use it in GitHub Desktop.
Save h-a-t-zz/eafbb19d7ce46c4ee4a541df018a5f37 to your computer and use it in GitHub Desktop.
PWD stack
version: "3.2"
services:
gateway:
labels:
- "traefik.enable=false"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- 8080:8080
image: functions/gateway:0.6.6-beta
networks:
- functions
environment:
dnsrr: "true" # Temporarily use dnsrr in place of VIP while issue persists on PWD
deploy:
placement:
constraints:
- 'node.role == manager'
- 'node.platform.os == linux'
prometheus:
labels:
- "traefik.enable=false"
image: functions/prometheus:latest # autobuild from Dockerfile in repo.
command: "-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -storage.local.memory-chunks=10000 --alertmanager.url=http://alertmanager:9093"
ports:
- 9090:9090
depends_on:
- gateway
- alertmanager
environment:
no_proxy: "gateway"
networks:
- functions
deploy:
placement:
constraints:
- 'node.role == manager'
- 'node.platform.os == linux'
alertmanager:
labels:
- "traefik.enable=false"
image: functions/alertmanager:latest # autobuild from Dockerfile in repo.
environment:
no_proxy: "gateway"
# volumes:
# - ./prometheus/alertmanager.yml:/alertmanager.yml
command:
- '-config.file=/alertmanager.yml'
networks:
- functions
ports:
- 9093:9093
deploy:
placement:
constraints:
- 'node.role == manager'
- 'node.platform.os == linux'
registry:
labels:
- "traefik.enable=false"
image: registry:2 # Image Registry
environment:
no_proxy: "gateway"
networks:
- functions
ports:
- 5000:5000
deploy:
placement:
constraints:
- 'node.role == manager'
- 'node.platform.os == linux'
jupyter:
labels:
- "traefik.enable=false"
image: jupyter/base-notebook:latest # Jupyter
environment:
no_proxy: "gateway"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
command: ["start.sh", "jupyter", "lab"]
networks:
- functions
ports:
- 8888:8888
deploy:
placement:
constraints:
- 'node.role == manager'
- 'node.platform.os == linux'
sonarqube:
labels:
- "traefik.enable=false"
image: sonarqube:latest # Sonarqube Code Analysis
environment:
no_proxy: "gateway"
networks:
- functions
ports:
- 9000:9000
deploy:
placement:
constraints:
- 'node.role == manager'
- 'node.platform.os == linux'
# Service label of "function" allows functions to show up in UI on http://gateway:8080/
webhookstash:
labels:
- "traefik.enable=false"
image: functions/webhookstash:latest
labels:
function: "true"
depends_on:
- gateway
networks:
- functions
environment:
no_proxy: "gateway"
https_proxy: $https_proxy
deploy:
placement:
constraints:
- 'node.platform.os == linux'
networks:
functions:
driver: overlay
# Docker does not support this option yet - maybe create outside of the stack and reference as "external"?
#attachable: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment