-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (65 loc) · 1.85 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
version: '2'
services:
clustertest-processor:
build:
context: ./processor
dockerfile: Dockerfile
image: clustertest/processor
volumes:
- /clustertest/data/processor:/opt/clustertest
expose:
- "80"
networks:
- default
links:
- clustertest-db:db
- clustertest-db:discovery
environment:
- CLUSTER_DISCOVERY_URL=mongodb://discovery/clustertest-cluster
- CLUSTER_ENDPOINT_URL=http://clustertest-processor
- CLUSTER_SERVICE=processor
- MONGO_URL=mongodb://db/clustertest
- MONGO_OPLOG_URL=mongodb://db/local
- ROOT_URL=http://clustertest-processor
restart: always
clustertest-web:
build:
context: ./webapp
dockerfile: Dockerfile
image: clustertest/web
expose:
- "80"
networks:
- default
- vhost_net
links:
- clustertest-db:db
- clustertest-db:discovery
- clustertest-processor:processor
environment:
- VIRTUAL_HOST=beta.yourdomain.com
- LETSENCRYPT_HOST=beta.yourdomain.com
- CLUSTER_DISCOVERY_URL=mongodb://discovery/clustertest-cluster
- CLUSTER_ENDPOINT_URL=http://clustertest-web
- CLUSTER_SERVICE=web
- MONGO_URL=mongodb://db/clustertest
- MONGO_OPLOG_URL=mongodb://db/local
- ROOT_URL=https://beta.yourdomain.com
restart: always
clustertest-db:
image: ekesken/mongo:2.6 # ReplSet Enabled
volumes:
- /clustertest/data/mongo:/data/db
ports:
- "27017:27017"
environment: # OPLOG!
- REPLICATION_SET_NAME=rs0
restart: always
# $ mongo localhost/admin
# cluster:PRIMARY> rs.initiate()
# cluster:PRIMARY> db.createUser({user: "oplogger", pwd: "oplogger", roles: [{role: "read", db: "local"}]})
networks:
vhost_net:
external:
name: nginx_vhost_net