mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 01:41:50 +08:00

* Fix integration of postgres and fake-data-gen containers This fix introduces the following modifications: - Upgrades to 2.1 docker-compose file format - Adds a health check for determining that postgrestest service is healthy - Modifies the fake-postgres-data service to wait for postgrestest to be "healthy" before starting. - Renames postgrestest to postgres
25 lines
712 B
YAML
25 lines
712 B
YAML
postgres:
|
|
image: postgres:${postgres_version}
|
|
environment:
|
|
POSTGRES_USER: grafana
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DATABASE: grafana
|
|
ports:
|
|
- "5432:5432"
|
|
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-q", "-d", "$$POSTGRES_DATABASE", "-U", "$$POSTGRES_USER" ]
|
|
timeout: 45s
|
|
interval: 10s
|
|
retries: 10
|
|
|
|
fake-postgres-data:
|
|
image: grafana/fake-data-gen
|
|
network_mode: bridge
|
|
environment:
|
|
FD_DATASOURCE: postgres
|
|
FD_PORT: 5432
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|