mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2026-02-02 09:25:07 +01:00
Add docker-compose healthcheck for test dependencies (#12)
This commit is contained in:
parent
c4fc848624
commit
247d7296f8
5 changed files with 33 additions and 32 deletions
|
|
@ -1,13 +1,23 @@
|
|||
dbmate:
|
||||
build: .
|
||||
volumes:
|
||||
- .:/go/src/github.com/amacneil/dbmate
|
||||
links:
|
||||
- mysql
|
||||
- postgres
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
postgres:
|
||||
image: postgres:9.4
|
||||
version: '2.1'
|
||||
services:
|
||||
dbmate:
|
||||
build: .
|
||||
volumes:
|
||||
- .:/go/src/github.com/amacneil/dbmate
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
mysql:
|
||||
image: mysql
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "status", "-proot"]
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue