-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
191 lines (188 loc) · 5.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
191 lines (188 loc) · 5.51 KB
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
189
190
191
services:
pyro_api:
container_name: api
image: pyronear/alert-api:latest
command: "sh -c 'alembic upgrade head && python app/db.py && uvicorn app.main:app --reload --host 0.0.0.0 --port 5050 --proxy-headers'"
ports:
- 5050:5050
environment:
- DEBUG=true
- POSTGRES_URL=postgresql+asyncpg://dummy_pg_user:dummy_pg_pwd@db/dummy_pg_db
- SQLALCHEMY_SILENCE_UBER_WARNING=1
- SUPERADMIN_LOGIN=${SUPERADMIN_LOGIN}
- SUPERADMIN_PWD=${SUPERADMIN_PWD}
- SUPERADMIN_ORG=admin
- S3_ENDPOINT_URL=${S3_ENDPOINT_URL}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_REGION=${S3_REGION}
# Host used in presigned URLs, which the browser opens (`rustfs` is compose-only).
- S3_PROXY_URL=${S3_PROXY_URL:-}
# Origins allowed to fetch() presigned URLs (bucket CORS policy, set at bucket creation).
- S3_CORS_ORIGINS=${S3_CORS_ORIGINS:-http://localhost:8080}
- SERVER_NAME=${SERVER_NAME}
- PLATFORM_URL=${PLATFORM_URL:-http://localhost:8080}
- TEMPORAL_API_URL=${TEMPORAL_API_URL:-}
- TEMPORAL_MODEL_THRESHOLD=${TEMPORAL_MODEL_THRESHOLD:-0.45}
- TEMPORAL_API_TOKEN=${TEMPORAL_API_TOKEN:-}
healthcheck:
test: ["CMD-SHELL", "curl -X 'GET' 'http://pyro_api:5050/status' -H 'accept: application/json'"]
interval: 20s
timeout: 10s
retries: 10
depends_on:
db:
condition: service_healthy
rustfs:
condition: service_healthy
db:
image: postgres:15-alpine
ports:
- 5432:5432
environment:
- POSTGRES_USER=dummy_pg_user
- POSTGRES_PASSWORD=dummy_pg_pwd
- POSTGRES_DB=dummy_pg_db
healthcheck:
test: [CMD-SHELL, sh -c 'pg_isready -U dummy_pg_user -d dummy_pg_db']
interval: 20s
timeout: 10s
retries: 10
rustfs:
image: rustfs/rustfs:1.0.0
container_name: rustfs
ports:
- "9000:9000"
- "9001:9001"
environment:
- RUSTFS_ACCESS_KEY=${S3_ACCESS_KEY}
- RUSTFS_SECRET_KEY=${S3_SECRET_KEY}
- RUSTFS_CONSOLE_ENABLE=true
volumes:
- rustfs_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/health/ready"]
interval: 10s
timeout: 10s
retries: 5
pyro_camera_api:
image: pyronear/pyro-camera-api:latest
profiles:
- engine
environment:
- CAM_USER=${CAM_USER}
- CAM_PWD=${CAM_PWD}
- MEDIAMTX_SERVER_IP=${MEDIAMTX_SERVER_IP}
volumes:
- ./data:/usr/src/app/data
network_mode: host
logging:
driver: json-file
options:
max-size: 100m
max-file: '5'
engine:
image: pyronear/pyro-engine:latest
profiles:
- engine
environment:
- API_URL=http://localhost:5050
- CAM_USER=${CAM_USER}
- CAM_PWD=${CAM_PWD}
command: python run.py
volumes:
- ./data:/usr/src/app/data
network_mode: host
logging:
driver: json-file
options:
max-size: 100m
max-file: '5'
temporal_model_api:
container_name: temporal_model_api
image: pyronear/temporal-model-api:latest
profiles:
- temporal
ports:
- 8000:8000
environment:
# Bucket is supplied per request by pyro-api (per-org alert buckets).
- TEMPORAL_API_S3_ENDPOINT_URL=${S3_ENDPOINT_URL}
- TEMPORAL_API_S3_REGION=${S3_REGION}
- AWS_ACCESS_KEY_ID=${S3_ACCESS_KEY}
- AWS_SECRET_ACCESS_KEY=${S3_SECRET_KEY}
# Empty = auth disabled; set the same value as pyro-api to require a token.
- TEMPORAL_API_TOKEN=${TEMPORAL_API_TOKEN:-}
depends_on:
rustfs:
condition: service_healthy
etl_scripts:
container_name: etl
image: pyronear/pyro-etl:latest
profiles:
- etl
environment:
- API_URL=${API_URL}
- SUPERADMIN_LOGIN=${SUPERADMIN_LOGIN}
- SUPERADMIN_PWD=${SUPERADMIN_PWD}
command: /bin/sh -c "python /usr/src/app/dl_images.py && python /usr/src/app/predict_load.py"
volumes:
- ./data:/usr/src/app/data
depends_on:
init_script:
condition: service_started
pyro_api:
condition: service_healthy
init_script:
container_name: init
image: pyronear/pyro-api-init:latest
environment:
- API_URL=${API_URL}
- SUPERADMIN_LOGIN=${SUPERADMIN_LOGIN}
- SUPERADMIN_PWD=${SUPERADMIN_PWD}
- SLACK_HOOK=${SLACK_HOOK}
volumes:
- ./data/:/data/
command: sh -c 'python /usr/local/bin/init_script.py && exit 0 || exit 1'
depends_on:
pyro_api:
condition: service_healthy
frontend:
image: pyronear/pyro-platform-react:latest
profiles:
- front
ports:
- 8080:8080
volumes:
# The React app runs in the browser, so API_URL in app-config.js must be
# reachable from the host (localhost:5050), not the compose network.
- ./containers/frontend/app-config.js:/usr/share/nginx/html/config/app-config.js:ro
- ./containers/frontend/sites_live_access.json:/usr/share/nginx/html/config/sites_live_access.json:ro
depends_on:
init_script:
condition: service_started
pyro_api:
condition: service_healthy
notebooks:
image: pyronear/notebooks:latest
profiles:
- tools
ports:
- 8889:8888
volumes:
- ./containers/notebooks/app:/app/notebooks
- ./data:/app/data
- .env:/app/.env
db-ui:
image: dpage/pgadmin4
profiles:
- tools
ports:
- "8888:80"
environment:
- PGADMIN_DEFAULT_EMAIL=${DB_UI_MAIL}
- PGADMIN_DEFAULT_PASSWORD=${DB_UI_PWD}
depends_on:
- db
volumes:
rustfs_data: