-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
36 lines (34 loc) · 982 Bytes
/
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
version: '3'
services:
postgres:
image: postgres:latest
container_name: postgres
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- ${SCHEMA_PATH}:/docker-entrypoint-initdb.d/schema.sql
- ${DATABASE_PATH}:/var/lib/postgresql/data
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
depends_on:
- postgres
environment:
GF_DATABASE_TYPE: ${GF_DATABASE_TYPE}
GF_DATABASE_HOST: ${GF_DATABASE_HOST}
GF_DATABASE_NAME: ${GF_DATABASE_NAME}
GF_DATABASE_USER: ${GF_DATABASE_USER}
GF_DATABASE_PASSWORD: ${GF_DATABASE_PASSWORD}
volumes:
- ${GRAFANA_VOLUME}:/var/lib/grafana
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"] # Adjust the URL if needed
interval: 30s
timeout: 10s
retries: 5