-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.hardened.yml
More file actions
59 lines (55 loc) · 1.49 KB
/
docker-compose.hardened.yml
File metadata and controls
59 lines (55 loc) · 1.49 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
services:
proxy:
image: nginx:1.27-alpine
ports:
- "8000:80"
depends_on:
api:
condition: service_started
volumes:
- ./infra/nginx/sentinel_public.conf:/etc/nginx/conf.d/default.conf:ro
api:
build:
context: .
dockerfile: Dockerfile
environment:
SENTINEL_API_KEY: ${SENTINEL_API_KEY:?SENTINEL_API_KEY must be set}
SENTINEL_RATE_LIMIT_PER_MINUTE: 120
SENTINEL_DATABASE_URL: postgresql://sentinel:sentinel@postgres:5432/sentinel
SENTINEL_REDIS_URL: redis://redis:6379/0
SENTINEL_ELECTORAL_PHASE: ${SENTINEL_ELECTORAL_PHASE:-}
SENTINEL_LEXICON_PATH: /app/data/lexicon_seed.json
SENTINEL_POLICY_CONFIG_PATH: /app/config/policy/default.json
expose:
- "8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: sentinel
POSTGRES_USER: sentinel
POSTGRES_PASSWORD: sentinel
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sentinel -d sentinel"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
- ./infra/postgres-init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
volumes:
- redisdata:/data
volumes:
pgdata:
redisdata: