-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
185 lines (175 loc) · 4.33 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
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:
postgresql:
image: postgres:13
env_file:
- .env
app:
build:
context: src/app
target: "${WARREN_APP_IMAGE_BUILD_TARGET:-development}"
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
image: "${WARREN_APP_IMAGE_NAME:-warren}:${WARREN_APP_IMAGE_TAG:-app-development}"
env_file:
- .env
ports:
- "${WARREN_APP_SERVER_PORT:-8090}:${WARREN_APP_SERVER_PORT:-8090}"
volumes:
- ./src/app:/app
depends_on:
- postgresql
- api
- frontend
api:
build:
context: src/api
target: "${WARREN_API_IMAGE_BUILD_TARGET:-development}"
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
image: "${WARREN_API_IMAGE_NAME:-warren}:${WARREN_API_IMAGE_TAG:-api-development}"
env_file:
- .env
ports:
- "${WARREN_API_SERVER_PORT:-8100}:${WARREN_API_SERVER_PORT:-8100}"
command:
- uvicorn
- "core.warren.api:app"
- "--proxy-headers"
- "--log-config"
- "core/logging-config.dev.yaml"
- "--host"
- "0.0.0.0"
- "--port"
- "${WARREN_API_SERVER_PORT:-8100}"
- "--reload"
volumes:
- ./src/api:/app
- ./bin/patch_statements_date.py:/opt/src/patch_statements_date.py
- ./bin/seed_experience_index.py:/opt/src/seed_experience_index.py
depends_on:
- ralph
- postgresql
frontend:
build:
context: src/frontend
target: "${WARREN_FRONTEND_IMAGE_BUILD_TARGET:-development}"
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
image: "${WARREN_FRONTEND_IMAGE_NAME:-warren}:${WARREN_FRONTEND_IMAGE_TAG:-frontend-development}"
environment:
HOME: /tmp
command:
- yarn
- run
- dev
volumes:
- ./src/frontend:/app
- .git:/app/.git
- ./src/app/staticfiles:/app/staticfiles
depends_on:
- api
# -- backends
ralph:
image: fundocker/ralph:4.2.0
user: ${DOCKER_USER:-1000}
env_file:
- .env
ports:
- "${RALPH_RUNSERVER_PORT:-8200}:${RALPH_RUNSERVER_PORT:-8200}"
command:
- ralph
- "-v"
- DEBUG
- runserver
- "-b"
- "es"
volumes:
- .:/app
depends_on:
- elasticsearch
elasticsearch:
image: elasticsearch:8.1.0
environment:
bootstrap.memory_lock: true
discovery.type: single-node
xpack.security.enabled: "false"
cluster.routing.allocation.disk.watermark.low: "2gb"
cluster.routing.allocation.disk.watermark.high: "1gb"
cluster.routing.allocation.disk.watermark.flood_stage: "500mb"
cluster.info.update.interval: "1m"
ports:
- "9200:9200"
mem_limit: 2g
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: curl --fail http://localhost:9200/_cluster/health?wait_for_status=green || exit 1
interval: 1s
retries: 60
# -- tools
dockerize:
image: jwilder/dockerize
volumes:
- ./src/app/staticfiles:/app/staticfiles
notebook:
build:
context: ./notebook
user: "root:root"
environment:
NB_UID: ${DOCKER_UID:-1000}
NB_GID: ${DOCKER_GID:-1000}
CHOWN_HOME: 'yes'
CHOWN_HOME_OPTS: -R
ports:
- 8888:8888
group_add:
- users
volumes:
- ./notebook/notebooks:/home/jovyan/work
- ./src/api:/home/jovyan/work/warren
- ./data:/home/jovyan/work/data
docs:
build:
context: ./docs
args:
DOCKER_GID: ${DOCKER_GID:-1000}
DOCKER_UID: ${DOCKER_UID:-1000}
user: ${DOCKER_USER:-1000}
environment:
HOME: /home/docs
command:
- mkdocs
- serve
- "--dev-addr"
- "0.0.0.0:8000"
ports:
- "${WARREN_DOCS_SERVER_PORT:-8000}:${WARREN_DOCS_SERVER_PORT:-8000}"
volumes:
- .:/app
- ~/.gitconfig:/home/docs/.gitconfig
- ~/.ssh:/home/docs/.ssh
mike:
image: warren-docs
user: ${DOCKER_USER:-1000}
environment:
HOME: /home/docs
command:
- mike
- serve
- "--dev-addr"
- "0.0.0.0:8001"
ports:
- "${WARREN_DOCS_MIKE_PORT:-8001}:${WARREN_DOCS_MIKE_PORT:-8001}"
volumes:
- .:/app
- ~/.gitconfig:/home/docs/.gitconfig
- ~/.ssh:/home/docs/.ssh
prettier:
image: tmknom/prettier
volumes:
- .:/work