This repository has been archived by the owner on Feb 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
141 lines (132 loc) · 3.42 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
version: '2'
services:
consul:
image: consul:latest
container_name: consul
network_mode: host
environment:
CONSUL_BIND_INTERFACE: "wlp4s0"
CONSUL_LOCAL_CONFIG: "{\"ports\": {\"dns\": 53}, \"recursors\": [\"8.8.8.8\"]}"
CONSUL_ALLOW_PRIVILEGED_PORTS: "true"
labels:
SERVICE_IGNORE: "true"
registrator:
image: gliderlabs/registrator:latest
container_name: registrator
privileged: true
network_mode: host
depends_on:
- consul
command: consul://localhost:8500
volumes:
- /var/run/docker.sock:/tmp/docker.sock
#dns:
# image: andyshinn/dnsmasq:latest
# container_name: dnsmasq
# command: -S /consul/127.0.0.1#8600
# network_mode: host
# cap_add:
# - NET_ADMIN
proxy:
image: traefik
container_name: proxy
command: --web --consul --consul.endpoint=localhost:8500 --consulcatalog.endpoint=localhost:8500 --logLevel=DEBUG
network_mode: host
depends_on:
- consul
dns: "172.17.0.1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
labels:
SERVICE_IGNORE: "true"
gogs:
image: gogs/gogs:0.11.19
container_name: gogs
depends_on:
- registrator
- gogs-database
network_mode: host
ports:
- "3000:3000"
environment:
- SERVICE_NAME=gogs
dns: "172.17.0.1"
volumes:
- /data"
labels:
SERVICE_TAGS: "traefik.frontend.rule=Host:gogs.service.consul"
gogs-database:
image: postgres:9.1
container_name: gogs-database
depends_on:
- registrator
network_mode: host
ports:
- "5432:5432"
environment:
- SERVICE_NAME=gogs-database
- POSTGRES_USER=gogs
- POSTGRES_PASSWORD=gogs
dns: "172.17.0.1"
volumes:
- /var/lib/postgresql/data
labels:
SERVICE_TAGS: "traefik.frontend.rule=Host:gogs-database.service.consul"
drone-server:
image: drone/drone:0.7
container_name: drone-server
depends_on:
- registrator
- drone-database
network_mode: host
ports:
- "8000:8000"
environment:
- SERVICE_NAME=drone
dns: "172.17.0.1"
environment:
- DRONE_SECRET=gogsdronecompose
- DRONE_OPEN=true
- DRONE_HOST=http://drone.service.consul
- DRONE_GOGS=true
- DRONE_GOGS_URL=http://gogs.service.consul
- DRONE_DATABASE_DRIVER=mysql
- DRONE_DATABASE_DATASOURCE=root:drone@tcp(drone-database.service.consul:3306)/drone?parseTime=true
- DEBUG=true
volumes:
- /var/lib/drone
labels:
SERVICE_TAGS: "traefik.frontend.rule=Host:drone.service.consul"
drone-database:
image: mysql:5.7
container_name: drone-database
depends_on:
- registrator
network_mode: host
ports:
- "3306:3306"
environment:
- SERVICE_NAME=drone-database
- MYSQL_ROOT_PASSWORD=drone
- MYSQL_DATABASE=drone
dns: "172.17.0.1"
volumes:
- /var/lib/postgresql/data
labels:
SERVICE_TAGS: "traefik.frontend.rule=Host:drone-database.service.consul"
drone-agent:
image: drone/drone:0.7
container_name: drone-agent
command: agent
depends_on:
- registrator
- drone-server
dns: "172.17.0.1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=ws://drone.service.consul/ws/broker
- DRONE_SECRET=gogsdronecompose
labels:
SERVICE_IGNORE: "true"