This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-07-25 16:36:10 -03:00
parent 8424479e76
commit 53e6078cc5
22 changed files with 307 additions and 144 deletions

View File

@@ -1,21 +1,20 @@
version: '3.2'
services:
haproxy:
container_name: proxy
container_name: haproxy
image: haproxy
ports:
- "80:8080"
- "443:8443"
volumes:
- ./haproxy:/usr/local/etc/haproxy
pwd1:
pwd:
# pwd daemon container always needs to be named this way
container_name: pwd1
container_name: pwd
# use the latest golang image
image: golang
# go to the right place and starts the app
command: /bin/sh -c 'ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null; cd /go/src/github.com/play-with-docker/play-with-docker; go run api.go -save /pwd/sessions1 -name pwd1 -cname host1'
command: /bin/sh -c 'ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null; cd /go/src/github.com/play-with-docker/play-with-docker; go run api.go -save /pwd/sessions -name l2'
volumes:
# since this app creates networks and launches containers, we need to talk to docker daemon
- /var/run/docker.sock:/var/run/docker.sock
@@ -24,37 +23,20 @@ services:
- sessions:/pwd
environment:
GOOGLE_RECAPTCHA_DISABLED: "true"
ports:
- "1022:1022"
pwd2:
# pwd daemon container always needs to be named this way
container_name: pwd2
l2:
container_name: l2
# use the latest golang image
image: golang
# go to the right place and starts the app
command: /bin/sh -c 'ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null; cd /go/src/github.com/play-with-docker/play-with-docker; go run api.go -save /pwd/sessions2 -name pwd2 -cname host2'
command: /bin/sh -c 'ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null; cd /go/src/github.com/play-with-docker/play-with-docker/router/l2; go run l2.go -ssh_key_path /etc/ssh/ssh_host_rsa_key -name l2 -save /pwd/networks'
volumes:
# since this app creates networks and launches containers, we need to talk to docker daemon
- /var/run/docker.sock:/var/run/docker.sock
# mount the box mounted shared folder to the container
- $GOPATH/src:/go/src
- sessions:/pwd
environment:
GOOGLE_RECAPTCHA_DISABLED: "true"
- /var/run/docker.sock:/var/run/docker.sock
- networks:/pwd
ports:
- "1023:1022"
prometheus:
container_name: prometheus
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
container_name: grafana
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- grafana:/var/lib/grafana
- "8022:22"
- "8053:53"
- "443:443"
volumes:
sessions:
grafana:
networks: