-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.override.yaml
121 lines (115 loc) · 3.31 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
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
"
volumes:
celery-SAM-model: