1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 01:57:32 +08:00

update docker-compose.yml

This commit is contained in:
bingohuang 2017-05-24 15:53:14 +08:00
parent 1088800d41
commit 474ae465cc

View File

@ -2,7 +2,7 @@ version: '2'
services: services:
haproxy: haproxy:
container_name: proxy container_name: proxy
image: haproxy image: hub.c.163.com/library/haproxy:1.7.5
ports: ports:
- "80:8080" - "80:8080"
- "443:8443" - "443:8443"
@ -13,9 +13,9 @@ services:
# pwd daemon container always needs to be named this way # pwd daemon container always needs to be named this way
container_name: pwd1 container_name: pwd1
# use the latest golang image # use the latest golang image
image: golang image: hub.c.163.com/library/golang:1.8.2
# go to the right place and starts the app # go to the right place and starts the app
command: /bin/sh -c '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 'cd /go/src/github.com/bingohuang/docker-labs; go run api.go -save ./pwd/sessions1 -name pwd1 -cname host1'
volumes: volumes:
# since this app creates networks and launches containers, we need to talk to docker daemon # since this app creates networks and launches containers, we need to talk to docker daemon
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
@ -29,9 +29,9 @@ services:
# pwd daemon container always needs to be named this way # pwd daemon container always needs to be named this way
container_name: pwd2 container_name: pwd2
# use the latest golang image # use the latest golang image
image: golang image: hub.c.163.com/library/golang:1.8.2
# go to the right place and starts the app # go to the right place and starts the app
command: /bin/sh -c '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 'cd /go/src/github.com/bingohuang/docker-labs; go run api.go -save ./pwd/sessions2 -name pwd2 -cname host2'
volumes: volumes:
# since this app creates networks and launches containers, we need to talk to docker daemon # since this app creates networks and launches containers, we need to talk to docker daemon
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock