-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
66 lines (62 loc) · 1.68 KB
/
docker-compose.yml
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
services:
web:
build:
context: ./
dockerfile: Dockerfile
container_name: cheminformatics-microservice
environment:
- HOMEPAGE_URL=https://docs.api.naturalproducts.net
- RELEASE_VERSION=v2.6.0
- WORKERS=2 # Make workers configurable
ports:
- "80:80"
healthcheck:
test: curl -f http://localhost:80/latest/chem/health || exit 1
interval: 90s
timeout: 10s
retries: 20
start_period: 60s
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- cm_fastapi
prometheus:
image: prom/prometheus:latest # Specify version for better stability
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus_data/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: unless-stopped
networks:
- cm_fastapi
grafana:
image: grafana/grafana:latest
container_name: grafana
user: "472" # Grafana's official user ID
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin} # Configurable password
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
depends_on:
- prometheus
networks:
- cm_fastapi
volumes:
prometheus_data:
grafana_data:
networks:
cm_fastapi:
name: cm_fastapi
driver: bridge