-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (63 loc) · 1.87 KB
/
docker-compose.yml
File metadata and controls
64 lines (63 loc) · 1.87 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
version: '3'
services:
cache:
restart: always
image: redis:7.0-alpine
container_name: fdsnws-availability-cache
network_mode: "host"
command: redis-server --save 20 1 --loglevel warning
cacher:
build:
context: ./
dockerfile: Dockerfile.cacher
container_name: fdsnws-availability-cacher
network_mode: "host"
environment:
- RUNMODE=production
# Host Networking: Redis is on localhost
- CACHE_HOST=127.0.0.1
# Limit OpenBLAS threads (Fix for Cacher Crash)
- OPENBLAS_NUM_THREADS=1
- MKL_NUM_THREADS=1
- NUMEXPR_NUM_THREADS=1
- OMP_NUM_THREADS=1
ulimits:
nproc: 65535
security_opt:
- seccomp:unconfined
api:
build:
context: ./
dockerfile: Dockerfile.api
restart: always
# Worker Configuration:
# - Default: 1 worker (most stable for resource-constrained servers)
# - Moderate: 2-3 workers (recommended if no thread creation issues)
# - High-performance: (2 × CPU cores) + 1 workers
# See README.md "Performance Tuning" section for details
command: gunicorn --bind 0.0.0.0:9001 --workers 1 --timeout 600 start:app
container_name: fdsnws-availability-api
network_mode: "host"
environment:
- RUNMODE=production
# Host Networking: Redis is on localhost
- CACHE_HOST=127.0.0.1
# Gateway IP (Update if needed)
- MONGODB_HOST
- MONGODB_PORT
- MONGODB_USR
- MONGODB_PWD
- MONGODB_NAME
- FDSNWS_STATION_URL=https://eida.gein.noa.gr/fdsnws/station/1/query
# Limit OpenBLAS threads to prevent "pthread_create failed" on restricted servers
- OPENBLAS_NUM_THREADS=1
- MKL_NUM_THREADS=1
- NUMEXPR_NUM_THREADS=1
- OMP_NUM_THREADS=1
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
security_opt:
- seccomp:unconfined