-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.override.yaml
188 lines (174 loc) · 5.46 KB
/
docker-compose.override.yaml
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
186
187
188
services:
django:
platform: linux/amd64
build:
dockerfile: Dockerfile
target: dev
command: [
"poetry", "run",
"--directory", "/app",
"/app/manage.py",
"runserver", "0.0.0.0:8000"
]
env_file:
- .env
- ./dev/.env.docker-compose
environment:
RDWATCH_POSTGRESQL_URI: "postgresql://rdwatch:secretkey@postgresql:5432/rdwatch"
RDWATCH_REDIS_URI: "redis://redis:6379"
RDWATCH_CELERY_BROKER_URL: "redis://redis:6379"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/status"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./rdwatch:/app/rdwatch
- ./.git:/app/rdwatch/.git
ports:
- 8000:8000
depends_on:
- postgresql
- redis
- minio
celery_worker:
platform: linux/amd64
build:
dockerfile: Dockerfile
target: dev
command: [
"poetry", "run",
"--directory", "/app/rdwatch",
"celery",
"--app", "rdwatch.celery",
"worker",
"--loglevel", "INFO",
"--without-heartbeat",
]
env_file:
- .env
- ./dev/.env.docker-compose
environment:
RDWATCH_POSTGRESQL_URI: "postgresql://rdwatch:secretkey@postgresql:5432/rdwatch"
RDWATCH_REDIS_URI: "redis://redis:6379"
RDWATCH_CELERY_BROKER_URL: "redis://redis:6379"
volumes:
- ./rdwatch:/app/rdwatch
- celery-SAM-model:/data/SAM
depends_on:
postgresql:
condition: service_started
minio:
condition: service_started
redis:
condition: service_started
django:
condition: service_healthy
celery_beat:
platform: linux/amd64
build:
dockerfile: Dockerfile
target: dev
command: [
"poetry", "run",
"--directory", "/app/rdwatch",
"celery",
"--app", "rdwatch.celery",
"beat",
"--loglevel", "INFO",
]
env_file:
- .env
- ./dev/.env.docker-compose
environment:
RDWATCH_POSTGRESQL_URI: "postgresql://rdwatch:secretkey@postgresql:5432/rdwatch"
RDWATCH_REDIS_URI: "redis://redis:6379"
RDWATCH_CELERY_BROKER_URL: "redis://redis:6379"
volumes:
- ./rdwatch:/app/rdwatch
rdwatch-client:
image: node:20
container_name: rd-watch-client
working_dir: /usr/src/app
environment:
VITE_DEV_PROXY_TARGET: "django" # tells vite.config to use django:8000 instead of localhost:8000
VITE_DEV_VECTOR_PROXY_TARGET: "vectorserver" # tells vite.config to use vectorserver:8001 instead of localhost:8001
volumes:
- ./:/usr/src/source:ro # entire directory needs to be mounted for git reference
ports:
- "8080:8080"
# required for the git display of the commit hash
command: >
sh -c "
# Copy the contents of /usr/src/source to /usr/src/app to prevent overwriting local node_modules
cp -r /usr/src/source /usr/src/app &&
# Configure git to treat /usr/src/app/source/ as a safe directory for client hash displaying
git config --global --add safe.directory /usr/src/app/source/ &&
# Change directory to /usr/src/app/source/vue
cd /usr/src/app/source/vue &&
# Install npm dependencies
npm install &&
# Run the npm development script
npm run dev
"
iqr_rest:
image: rdwatch-smqtk-iqr
build:
dockerfile: docker/smqtk-iqr.Dockerfile
context: .
# needed for dependencies to properly install
platform: linux/amd64
command:
["runApplication", "-a", "IqrService", "-c", "runApp.IqrRestService.json"]
ports:
- 5001:5001
working_dir: /iqr
volumes:
# where rest + search app configs are stored
- ./iqr:/iqr
# needed for accessing the workdir from the config
# EDIT THIS VOLUME MOUNT BEFORE RUNNING
#- /path/to/iqr-data/workdir:/iqr/workdir
- /Users/forrest.li/scratch/iqr/workdir:/iqr/workdir
# needed to make sure faiss_index exists, otherwise IQR initialization won't work
# EDIT THIS VOLUME MOUNT BEFORE RUNNING
#- /path/to/iqr-data/models:/iqr/models
- /Users/forrest.li/scratch/iqr/models:/iqr/models
# only needed for the built-in IQR interface
#smqtk_mongo:
# image: mongo:latest
# ports:
# - 27017:27017
# volumes:
# - smqtk-mongo:/data/db
#iqr_web:
# image: rdwatch-smqtk-iqr
# # needed for dependencies to properly install
# platform: linux/amd64
# command:
# [
# "runApplication",
# "-a",
# "IqrSearchDispatcher",
# "-c",
# "runApp.IqrSearchApp.json",
# ]
# ports:
# - 5000:5000
# working_dir: /iqr
# volumes:
# # where rest + search app configs are stored
# # - ./iqr/workdir:/iqr/workdir
# - ./iqr:/iqr
# # needed for accessing the workdir from the config
# - /SMQTK-IQR/docs/tutorials/tutorial_003_geowatch_descriptors/workdir:/iqr/workdir
# # needed to make sure faiss_index exists, otherwise IQR initialization won't work
# - /SMQTK-IQR/docs/tutorials/tutorial_003_geowatch_descriptors/models:/iqr/models
# # The workdir/processed/chips/manifest.json file stores absolute paths, so we add another bind mount to satisfy the abs paths
# # from when I generated the outputs.
# - /SMQTK-IQR/docs/tutorials/tutorial_003_geowatch_descriptors/workdir:/SMQTK-IQR/docs/tutorials/tutorial_003_geowatch_descriptors/workdir
# depends_on:
# - smqtk_mongo
# - iqr_rest
volumes:
celery-SAM-model: