-
Notifications
You must be signed in to change notification settings - Fork 274
/
docker-compose.dev.yml
185 lines (174 loc) · 4.39 KB
/
docker-compose.dev.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
services:
postgres:
image: postgres:15
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
# enable this to log all SQL statements
# command: ["postgres", "-c", "log_statement=all"]
environment:
POSTGRES_USER: aleph
POSTGRES_PASSWORD: aleph
POSTGRES_DATABASE: aleph
elasticsearch:
image: ghcr.io/alephdata/aleph-elasticsearch:3bb5dbed97cfdb9955324d11e5c623a5c5bbc410
restart: on-failure
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "http.cors.enabled=true"
- "http.cors.allow-origin=*"
- "http.cors.allow-headers=*"
- "http.cors.allow-credentials=true"
ports:
- "127.0.0.1:9200:9200"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
redis:
image: redis:alpine
command: ["redis-server", "--save", "3600", "10"]
volumes:
- redis-data:/data
rabbitmq:
image: rabbitmq:3.9-management-alpine
ports:
- "127.0.0.1:5672:5672"
- "127.0.0.1:15672:15672"
volumes:
- rabbitmq-data:/var/lib/rabbitmq/
convert-document:
image: ghcr.io/alephdata/convert-document:latest
read_only: true
restart: on-failure
user: app
tmpfs: /tmp
ingest-file:
image: ghcr.io/alephdata/ingest-file:4.0.0
# build:
# context: ../ingest-file
hostname: ingest
tmpfs: /tmp
volumes:
- archive-data:/data
depends_on:
- postgres
- redis
- rabbitmq
restart: on-failure
env_file:
- aleph.env
# translate:
# build:
# context: services/translate
# image: alephdata/translate:${ALEPH_TAG:-latest}
# volumes:
# - archive-data:/data
# - "./services/translate/translate:/translate/translate"
# - "/:/host"
# restart: on-failure
# environment:
# GOOGLE_APPLICATION_CREDENTIALS: '/host/.../translate-service-account.json'
# GOOGLE_PROJECT_ID: my-project
# env_file:
# - aleph.env
app:
build:
context: .
image: ghcr.io/alephdata/aleph:${ALEPH_TAG:-latest}
hostname: aleph
command: /bin/bash
depends_on:
- postgres
- elasticsearch
- redis
- rabbitmq
# - translate
- ingest-file
tmpfs: /tmp
volumes:
- archive-data:/data
- "./aleph:/aleph/aleph"
- "./site:/aleph/site"
- "./contrib:/aleph/contrib"
- "./mappings:/aleph/mappings"
- "~:/host"
cap_add:
- SYS_PTRACE
environment:
ALEPH_DEBUG: "true"
ALEPH_SECRET_KEY: "development"
env_file:
- aleph.env
api:
build:
context: .
image: ghcr.io/alephdata/aleph:${ALEPH_TAG:-latest}
command: python3 -m debugpy --listen 0.0.0.0:5678 -m flask run -h 0.0.0.0 -p 5000 --with-threads --reload --debugger
ports:
- "127.0.0.1:5000:5000"
- "127.0.0.1:5678:5678"
restart: on-failure
depends_on:
- postgres
- elasticsearch
- redis
- rabbitmq
- ingest-file
tmpfs: /tmp
volumes:
- archive-data:/data
- "./aleph:/aleph/aleph"
- "./site:/aleph/site"
environment:
ALEPH_DEBUG: "true"
ALEPH_PROFILE: "false"
ALEPH_SECRET_KEY: "development"
FLASK_APP: "aleph.wsgi"
env_file:
- aleph.env
ui:
build:
context: ui
image: ghcr.io/alephdata/aleph-ui:${ALEPH_TAG:-latest}
depends_on:
- api
command: "bash -c 'rsync --archive --inplace --no-compress --whole-file /node_modules /alephui && npm run start'"
ports:
- "127.0.0.1:8080:8080"
volumes:
- "./ui/src:/alephui/src:cached"
- "./ui/package.json:/alephui/package.json:cached"
- "./ui/package-lock.json:/alephui/package-lock.json:cached"
- "./ui/craco.config.js:/alephui/craco.config.js:cached"
- "./ui/node_modules:/alephui/node_modules:delegated"
environment:
PORT: "8080"
CI: "true"
env_file:
- aleph.env
worker:
build:
context: .
image: alephdata/aleph:${ALEPH_TAG:-latest}
command: aleph worker
restart: on-failure
depends_on:
- postgres
- elasticsearch
- redis
- ingest-file
- rabbitmq
tmpfs:
- /tmp
volumes:
- archive-data:/data
env_file:
- aleph.env
volumes:
archive-data: {}
elasticsearch-data: {}
postgres-data: {}
redis-data: {}
rabbitmq-data: {}