Add healthcheck to docker-compose databases to easier debug (#15735)
* Waiting for postgres to startup before tests * Add healthcheck * Test postgres default * Prefer pgisready command Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b8ceb610e6
Коммит
14fe307436
@@ -11,6 +11,11 @@ services:
|
|||||||
MYSQL_PASSWORD: mostest
|
MYSQL_PASSWORD: mostest
|
||||||
MYSQL_USER: mmuser
|
MYSQL_USER: mmuser
|
||||||
MYSQL_DATABASE: mattermost_test
|
MYSQL_DATABASE: mattermost_test
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
postgres:
|
postgres:
|
||||||
image: "postgres:9.4"
|
image: "postgres:9.4"
|
||||||
restart: always
|
restart: always
|
||||||
@@ -23,6 +28,11 @@ services:
|
|||||||
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
|
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
|
||||||
volumes:
|
volumes:
|
||||||
- "./docker/postgres.conf:/etc/postgresql/postgresql.conf"
|
- "./docker/postgres.conf:/etc/postgresql/postgresql.conf"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "pg_isready", "-h", "localhost" ]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
minio:
|
minio:
|
||||||
image: "minio/minio:RELEASE.2019-10-11T00-38-09Z"
|
image: "minio/minio:RELEASE.2019-10-11T00-38-09Z"
|
||||||
command: "server /data"
|
command: "server /data"
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user