1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-13 17:42:53 +08:00
docker-labs/docker-compose.yml
2017-05-24 15:53:14 +08:00

44 lines
1.8 KiB
YAML

version: '2'
services:
haproxy:
container_name: proxy
image: hub.c.163.com/library/haproxy:1.7.5
ports:
- "80:8080"
- "443:8443"
volumes:
- ./haproxy:/usr/local/etc/haproxy
pwd1:
# pwd daemon container always needs to be named this way
container_name: pwd1
# use the latest golang image
image: hub.c.163.com/library/golang:1.8.2
# go to the right place and starts the app
command: /bin/sh -c 'cd /go/src/github.com/bingohuang/docker-labs; go run api.go -save ./pwd/sessions1 -name pwd1 -cname host1'
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
environment:
GOOGLE_RECAPTCHA_DISABLED: "true"
DIND_IMAGE: "hub.c.163.com/bingohuang/dind:17.05.0-ce-dind"
EXPIRY: "3h"
pwd2:
# pwd daemon container always needs to be named this way
container_name: pwd2
# use the latest golang image
image: hub.c.163.com/library/golang:1.8.2
# go to the right place and starts the app
command: /bin/sh -c 'cd /go/src/github.com/bingohuang/docker-labs; go run api.go -save ./pwd/sessions2 -name pwd2 -cname host2'
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
environment:
GOOGLE_RECAPTCHA_DISABLED: "true"
DIND_IMAGE: "hub.c.163.com/bingohuang/dind:17.05.0-ce-dind"
EXPIRY: "3h"