This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathdocker-compose.yml
154 lines (146 loc) · 3.87 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
version: '3'
services:
db:
image: postgres:10.3-alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: "openledger"
POSTGRES_USER: "deploy"
POSTGRES_PASSWORD: "deploy"
POSTGRES_HOST: "0.0.0.0"
healthcheck:
test: "pg_isready -U deploy -d openledger"
thumbs:
image: willnorris/imageproxy
ports:
- "8222:8222"
command: ["-addr", "0.0.0.0:8222"]
upstream_db:
image: postgres:10.3-alpine
ports:
- "5433:5432"
environment:
POSTGRES_DB: "openledger"
POSTGRES_USER: "deploy"
POSTGRES_PASSWORD: "deploy"
POSTGRES_HOST: "0.0.0.0"
healthcheck:
test: "pg_isready -U deploy -d openledger"
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.1.0
ports:
- "9200:9200"
environment:
# disable XPack
# https://www.elastic.co/guide/en/elasticsearch/reference/5.3/docker.html#_security_note
- xpack.security.enabled=false
- discovery.type=single-node
healthcheck:
test: ["CMD-SHELL", "curl -si -XGET 'localhost:9200/_cluster/health?pretty' | grep -qE 'yellow|green'"]
interval: 10s
timeout: 60s
retries: 10
ulimits:
nofile:
soft: 65536
hard: 65536
web:
build: ./cccatalog-api/
image: cccatalog_api
command: python manage.py runserver 0.0.0.0:8000
container_name: cccatalog-api_web_1
volumes:
- ./cccatalog-api:/cccatalog-api
ports:
- "8000:8000"
- "4444:4444"
depends_on:
- db
- es
environment:
- DJANGO_DATABASE_NAME=openledger
- DJANGO_DATABASE_USER=deploy
- DJANGO_DATABASE_PASSWORD=deploy
- DJANGO_DATABASE_HOST=db
- UPSTREAM_DATABASE_HOST=upstream_db
- PYTHONUNBUFFERED=0
- DJANGO_DEBUG_ENABLED=True
- ELASTICSEARCH_URL=es
- ELASTICSEARCH_PORT=9200
- DISABLE_GLOBAL_THROTTLING=True
- ROOT_SHORTENING_URL=localhost:8000
- THUMBNAIL_PROXY_URL=http://thumbs:8222
- DJANGO_SECRET_KEY=ny#b__$$f6ry4wy8oxre97&-68u_0lk3gw(z=d40_dxey3zw0v1
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
stdin_open: true
tty: true
cache:
image: redis:4.0.10
container_name: cccatalog-api_cache_1
ports:
- "6379:6379"
ingestion-server:
build: ./ingestion_server/
command: bash -c 'sleep 20 && supervisord -c config/supervisord.conf'
ports:
- "8001:8001"
depends_on:
- db
- es
- indexer-worker
volumes:
- ./ingestion_server:/ingestion-server
environment:
PYTHONUNBUFFERED: "0"
ELASTICSEARCH_URL: 'es'
ELASTICSEARCH_PORT: "9200"
DATABASE_HOST: 'db'
DATABASE_USER: 'deploy'
DATABASE_PASSWORD: 'deploy'
DATABASE_NAME: 'openledger'
DATABASE_PORT: '5432'
UPSTREAM_DB_HOST: 'upstream_db'
UPSTREAM_DB_PORT: 5432
DB_BUFFER_SIZE: '100000'
COPY_TABLES: 'image'
SYNCER_POLL_INTERVAL: '60'
stdin_open: true
tty: true
indexer-worker:
build:
context: ./ingestion_server/
dockerfile: Dockerfile-worker
container_name: indexer-worker
ports:
- "8002:8002"
depends_on:
- db
- es
volumes:
- ./ingestion_server:/ingestion-server
environment:
PYTHONUNBUFFERED: "0"
ELASTICSEARCH_URL: 'es'
ELASTICSEARCH_PORT: "9200"
DATABASE_HOST: 'db'
DATABASE_USER: 'deploy'
DATABASE_PASSWORD: 'deploy'
DATABASE_NAME: 'openledger'
DATABASE_PORT: '5432'
UPSTREAM_DB_HOST: 'upstream_db'
UPSTREAM_DB_PORT: 5432
DB_BUFFER_SIZE: '100000'
COPY_TABLES: 'image'
SYNCER_POLL_INTERVAL: '60'
stdin_open: true
tty: true
analytics:
build: ./analytics/
image: analytics
container_name: cccatalog-api_analytics_1
ports:
- "8090:8090"
environment:
DATABASE_CONN: 'postgres+psycopg2://deploy:deploy@db/openledger'