Merge pull request #2976 from emoryr/fix/demo-blog-dockercompose
Update docker composer file version and wait for postgres #2784
This commit is contained in:
commit
4f82dfd1ed
|
@ -1,15 +1,25 @@
|
||||||
postgres:
|
version: "3.8"
|
||||||
image: postgres:10.3
|
services:
|
||||||
environment:
|
postgres:
|
||||||
POSTGRES_USER: blog
|
image: postgres:10.3
|
||||||
POSTGRES_PASSWORD: blog
|
environment:
|
||||||
POSTGRES_DB: blog
|
POSTGRES_USER: blog
|
||||||
ports:
|
POSTGRES_PASSWORD: blog
|
||||||
- "3306"
|
POSTGRES_DB: blog
|
||||||
blog:
|
ports:
|
||||||
build: .
|
- "3306"
|
||||||
links:
|
healthcheck:
|
||||||
- postgres
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
ports:
|
interval: 5s
|
||||||
- "8888:8888"
|
timeout: 5s
|
||||||
command: --db_host=postgres
|
retries: 5
|
||||||
|
blog:
|
||||||
|
build: .
|
||||||
|
links:
|
||||||
|
- postgres
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
ports:
|
||||||
|
- "8888:8888"
|
||||||
|
command: --db_host=postgres
|
||||||
|
|
Loading…
Reference in New Issue