forked from WordPress/openverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (113 loc) · 2.81 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
include:
- "catalog/compose.yml"
- "ingestion_server/compose.yml"
- "api/compose.yml"
- "frontend/compose.yml"
- "indexer_worker/compose.yml"
services:
# Database used by the API
db:
profiles:
- ingestion_server
- api
- catalog_indexer_worker
image: docker.io/postgres:13.10-alpine
ports:
- "50254:5432"
volumes:
- api-postgres:/var/lib/postgresql/data
env_file:
- docker/db/env.docker
healthcheck:
test: "pg_isready"
# Database used by the catalog
upstream_db:
profiles:
- catalog
- catalog_dependencies
- ingestion_server
- catalog_indexer_worker
- api
build:
context: ./docker/upstream_db/
target: db
args: # Automatically inferred from env vars, unless specified
- PGCLI_VERSION
image: openverse-upstream_db
pull_policy: never
ports:
- "50255:5432"
volumes:
- catalog-postgres:/var/lib/postgresql/data
- ./sample_data:/sample_data:z
env_file:
- docker/upstream_db/env.docker
healthcheck:
test: "pg_isready"
plausible_db:
profiles:
- frontend
image: docker.io/postgres:13.10-alpine
expose:
- "5432"
volumes:
- plausible-postgres:/var/lib/postgresql/data
env_file:
- ./docker/plausible_db/env.docker
healthcheck:
test: "pg_isready -U deploy -d plausible"
plausible_ch:
profiles:
- frontend
image: docker.io/clickhouse/clickhouse-server:23.12-alpine
volumes:
- plausible-clickhouse:/var/lib/clickhouse
- ./docker/clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro,z
- ./docker/clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro,z
ulimits:
nofile:
soft: 262144
hard: 262144
plausible:
profiles:
- frontend
image: plausible/analytics:latest
ports:
- "50288:8000"
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on:
- plausible_db
- plausible_ch
env_file:
- docker/plausible/env.docker
es:
profiles:
- ingestion_server
- catalog_indexer_worker
- api
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.2
ports:
- "50292:9200"
env_file:
- docker/es/env.docker
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
volumes:
- es-data:/usr/share/elasticsearch/data
volumes:
api-postgres:
catalog-postgres:
plausible-postgres:
plausible-clickhouse:
es-data: