-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
77 lines (72 loc) · 2.11 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
77 lines (72 loc) · 2.11 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
# Sunucuda deploy icin production compose
# Kullanim:
# 1. Bu dosyayi ve .env dosyasini sunucuya kopyalayin
# 2. .env dosyasini duzenleyin (SECRET_KEY ve ADMIN_PASSWORD mutlaka degistirin!)
# 3. docker compose -f docker-compose.prod.yml up -d
services:
schema-monitor:
image: halilibrahimd27/api-sentinel-monitor:latest
container_name: api-sentinel-monitor
ports:
- "${MONITOR_PORT:-8080}:8080"
volumes:
- schema-data:/app/data
- schema-files:/app/schemas
environment:
- LOG_LEVEL=${LOG_LEVEL:-WARNING}
- CHECK_INTERVAL_DEFAULT=${CHECK_INTERVAL_DEFAULT:-5m}
- DB_PATH=/app/data/schemas.db
- SCHEMA_DIR=/app/schemas
- SECRET_KEY=${SECRET_KEY}
- AUTH_ENABLED=${AUTH_ENABLED:-true}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
- ALERT_COOLDOWN_SECONDS=${ALERT_COOLDOWN_SECONDS:-300}
networks:
- sentinel-net
healthcheck:
test: ["CMD", "python", "-c", "import httpx; r = httpx.get('http://localhost:8080/health'); r.raise_for_status()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
changelog-watcher:
image: halilibrahimd27/api-sentinel-changelog:latest
container_name: api-sentinel-changelog
volumes:
- changelog-data:/app/data
environment:
- LOG_LEVEL=${LOG_LEVEL:-WARNING}
networks:
- sentinel-net
depends_on:
schema-monitor:
condition: service_healthy
restart: unless-stopped
watchtower:
image: containrrr/watchtower:latest
container_name: api-watchtower
restart: always
deploy:
resources:
limits:
memory: 128M
cpus: '0.1'
reservations:
memory: 64M
cpus: '0.05'
environment:
- DOCKER_API_VERSION=1.44
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: --interval 300 --cleanup api-sentinel-monitor api-sentinel-changelog
networks:
- sentinel-net
volumes:
schema-data:
schema-files:
changelog-data:
networks:
sentinel-net:
driver: bridge