forked from play-with-docker/play-with-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (51 loc) · 2.26 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3.2'
services:
haproxy:
container_name: haproxy
image: polyverse/docker-haproxy-rsyslog
ports:
- "80:80"
- "443:443"
environment:
- CERTS=play.polyverse.io
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
- /etc/letsencrypt:/etc/letsencrypt
pwd:
# pwd daemon container always needs to be named this way
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/sessions -name l2 -default-session-duration 1h30m -playground-domain play.polyverse.io -default-dind-image polyverse/dind-alpine -cookie-hash-key '"'"'$CookieHashKey'"'"' -cookie-block-key '"'"'$CookieBlockKey'"'"''
environment:
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- FACEBOOK_CLIENT_ID=${FACEBOOK_CLIENT_ID}
- FACEBOOK_CLIENT_SECRET=${FACEBOOK_CLIENT_SECRET}
- CookieHashKey=${CookieHashKey}
- CookieBlockKey=${CookieBlockKey}
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
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/router/l2; go run l2.go -ssh_key_path /etc/ssh/ssh_host_rsa_key -name l2 -save /pwd/networks'
volumes:
- $GOPATH/src:/go/src
- /var/run/docker.sock:/var/run/docker.sock
- networks:/pwd
ports:
- "8022:22"
- "8053:53"
- "8443:443"
volumes:
sessions:
networks: