This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker-compose.yml
111 lines (101 loc) · 2.39 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
version: '3'
services:
haproxy:
build:
context: docker/haproxy
dockerfile: Dockerfile
ports:
# host's nginx is expected to terminate SSL and route all reddit requests here
- 8080:8080
restart: always
postgres:
build:
context: docker/postgres
dockerfile: Dockerfile
environment:
POSTGRES_USER: reddit
# WARNING: also hardcoded in reddit's 'cron' file
POSTGRES_PASSWORD: password
POSTGRES_DB: reddit
POSTGRES_INITDB_ARGS: '--encoding=utf8 --lc-collate=en_US.utf8 --lc-ctype=en_US.utf8'
ports:
- 5432:5432
volumes:
# can alternatively be a named volume
- ./volumes/postgres:/var/lib/postgresql/data
restart: always
cassandra:
image: reddit/cassandra:single-1.2.19-v1
ports:
- 9160:9160
volumes:
# can alternatively be a named volume
- ./volumes/cassandra:/var/lib/cassandra
restart: always
memcached:
build:
context: docker/memcached
dockerfile: Dockerfile
ports:
- 11211:11211
restart: always
mcrouter:
build:
context: docker/mcrouter
dockerfile: Dockerfile
ports:
- 5050:5050
restart: always
depends_on:
- memcached
rabbitmq:
build:
context: docker/rabbitmq
dockerfile: Dockerfile
environment:
RABBITMQ_DEFAULT_VHOST: /
RABBITMQ_DEFAULT_USER: reddit
RABBITMQ_DEFAULT_PASS: reddit
ports:
- 5672:5672
- 15672:15672
restart: always
zookeeper:
image: jplock/zookeeper:3.4.6
ports:
- 2181:2181
restart: always
solr:
build:
context: docker/solr
dockerfile: Dockerfile
ports:
- 8983:8983
restart: always
reddit:
build:
context: docker/reddit
dockerfile: Dockerfile
ports:
- 8001:8001
- 9000:9000
- 8082:8082
volumes:
# starts empty so bind mount can replace container directory, can alternatively be a named volume
- ./volumes/media:/srv/www/media
# persist existing development.update and future changes
- reddit_r2_data:/home/reddit/src/reddit/r2
# persist existing cron and future changes
- reddit_cron_data:/etc/cron.d
restart: always
depends_on:
- postgres
- cassandra
- memcached
- mcrouter
- rabbitmq
- zookeeper
- solr
volumes:
reddit_r2_data:
reddit_cron_data: