-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1.21 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
---
# docker-compose up
# no quote and no {} no commas
# example of array element is
# to parse yml is slower than parsing json, because everything is string and then we need to convert it to the right type
# tags:
# - tag1
# - tag2
# the volume name dumpdb_postgres-data
version: "3.8"
services:
database:
build:
context: ./postgres_tests
args:
- postgres_version=10.15
environment:
POSTGRES_USER: grafanatest
POSTGRES_PASSWORD: grafanatest
ports:
- "5432:5432"
container_name: database
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: 15s
timeout: 10s
retries: 5
start_period: 40s
volumes:
- postgres-data:/var/lib/postgresql/data
grafana:
image: grafana/grafana:${grafana_version}
container_name: grafana
ports:
# 3000 of computer to 3000 of container
- "3000:3000"
depends_on:
database:
condition: service_healthy
environment:
GF_DATABASE_TYPE: postgres
GF_DATABASE_HOST: database:5432
GF_DATABASE_NAME: grafanadstest
GF_DATABASE_USER: grafanatest
GF_DATABASE_PASSWORD: grafanatest
volumes:
postgres-data:
driver: local