-
Notifications
You must be signed in to change notification settings - Fork 47
/
docker-compose.yml
164 lines (152 loc) · 4.16 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# The etcd container coordinates our single-node cluster.
etcd:
build: containers/etcd
# The psql container runs the postgres server from the psqldata/data directory.
psql:
build: containers/psql
volumes:
- ./_psqldata/data:/var/lib/postgresql/data
# The psqlclient container provides a client connection to the psql container.
# TODO: add volume for persistent readline history, sql dumps, etc.
psqlclient:
command: psql -h psql -p 5432 -U postgres heim
build: containers/psql/client
links:
- psql
sentry:
image: slafs/sentry:7.4
ports:
- "9000:9000"
environment:
SENTRY_URL_PREFIX: http://localhost:9000
SENTRY_INITIAL_TEAM: euphoria
SENTRY_INITIAL_PROJECT: heim-client
SENTRY_INITIAL_PLATFORM: javascript
SENTRY_INITIAL_KEY: sentry:sentry
SENTRY_INITIAL_DOMAINS: localhost
SECRET_KEY: onlyfordevelopment
# The frontend container runs an ongoing gulp build.
frontend:
command: gulp build
build: client
volumes:
- .:/srv/heim/
- ./_deps/node_modules:/srv/heim/client/node_modules
- ./client/build:/srv/heim/client/build
ports:
- "8080:8080"
- "8081:8081"
environment:
NODE_ENV: development
SENTRY_ENDPOINT: http://sentry@localhost:9000/2
HEIM_ORIGIN: http://localhost:8080
EMBED_ORIGIN: http://localhost:8081
# The upgradedb container runs the upgradedb command against the psql container.
upgradedb:
build: backend/psql/migrations
links:
- psql
volumes:
- ./backend/psql/migrations:/migrations
# The backend container runs the backend server against the psql container with etcd mocked out.
backend:
build: backend
links:
- psql
volumes:
- .:/go/src/euphoria.io/heim
- ./_deps/godeps:/godeps
- ./client/build:/srv/heim/client/src/build
- ./backend/console/keys:/keys
ports:
- "8080:80"
- "2222:2222"
environment:
HEIM_ID: dev1
HEIM_ETCD: mock
HEIM_ETCD_HOME: /dev/euphoria.io
HEIM_CONFIG: /go/src/euphoria.io/heim/heim.yml
command: run.sh heimctl -static /srv/heim/client/src/build/heim serve -http :80 -console :2222
# The backend_etcd container runs the backend server against the psql container using etcd.
backend_etcd:
build: backend
links:
- etcd
- psql
volumes:
- .:/go/src/euphoria.io/heim
- ./_deps/godeps:/godeps
- ./client/build:/srv/heim/client/src/build
- ./backend/console/keys:/keys
ports:
- "8080:80"
- "2222:2222"
environment:
HEIM_ID: dev1
HEIM_ETCD: http://etcd:4001
HEIM_ETCD_HOME: /dev/euphoria.io
HEIM_CONFIG: /go/src/euphoria.io/heim/heim.yml
command: run.sh heimctl -static /srv/heim/client/src/build/heim serve -http :80 -console :2222
# The embed container serves static files for the embed domain.
embed:
build: backend
volumes:
- .:/go/src/euphoria.io/heim
- ./_deps/godeps:/godeps
- ./client/build:/srv/heim/client/src/build
ports:
- "8081:80"
command: run.sh heimctl serve-embed -http :80 -static /srv/heim/client/src/build/embed
presence:
build: backend
links:
- etcd
- psql
volumes:
- .:/go/src/euphoria.io/heim
- ./_deps/godeps:/godeps
ports:
- "8082:80"
environment:
HEIM_ETCD: http://etcd:4001
HEIM_ETCD_HOME: /dev/euphoria.io
HEIM_CONFIG: /go/src/euphoria.io/heim/heim.yml
command: run.sh heimctl presence-exporter -http :80 -interval 10s
retention:
build: backend
links:
- etcd
- psql
volumes:
- .:/go/src/euphoria.io/heim
- ./_deps/godeps:/godeps
ports:
- "8082:80"
environment:
HEIM_ETCD: http://etcd:4001
HEIM_ETCD_HOME: /dev/euphoria.io
HEIM_CONFIG: /go/src/euphoria.io/heim/heim.yml
command: run.sh heimctl log-retention -http :80 -interval 10s
activity:
build: backend
links:
- etcd
- psql
volumes:
- .:/go/src/euphoria.io/heim
- ./_deps/godeps:/godeps
ports:
- "8082:80"
environment:
HEIM_ETCD: http://etcd:4001
HEIM_ETCD_HOME: /dev/euphoria.io
HEIM_CONFIG: /go/src/euphoria.io/heim/heim.yml
command: run.sh heimctl activity-exporter -http :80
haproxy:
build: containers/haproxy
links:
- backend
volumes:
- ./containers/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- "8888:80"