-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (69 loc) · 2.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (69 loc) · 2.38 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
version: '2.4'
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
restart: always
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
volumes:
# Operator config lives on the host. Mounting it (rather than relying on
# it being baked into the image) is what makes the pre-built GHCR images
# usable: pull, set config.py, run — no rebuild. Read-only by design.
- ./config.py:/appli/config.py:ro
api:
build:
context: ./
dockerfile: Dockerfile.api
restart: always
# Worker count is set in config.py via GUNICORN_WORKERS — see gunicorn.conf.py.
# Default is 1; raise (2–3, or `(2 × CPU cores) + 1`) if you have CPU/RAM
# headroom. Bind / timeout stay on the CLI because they're container-level
# concerns, not per-operator tunables.
command: gunicorn -c gunicorn.conf.py --bind 0.0.0.0:9001 --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"
# MongoDB / FDSNWS-Station / Sentry settings are read from config.py.
# Do NOT add MONGODB_* or FDSNWS_STATION_URL here — env vars set in this
# block take precedence over config.py and would silently override the
# operator's settings.
# 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
volumes:
- ./config.py:/appli/config.py:ro
mem_limit: 2g
memswap_limit: 2g