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:
|
||||
image: postgres:10.3
|
||||
environment:
|
||||
POSTGRES_USER: blog
|
||||
POSTGRES_PASSWORD: blog
|
||||
POSTGRES_DB: blog
|
||||
ports:
|
||||
- "3306"
|
||||
blog:
|
||||
build: .
|
||||
links:
|
||||
- postgres
|
||||
ports:
|
||||
- "8888:8888"
|
||||
command: --db_host=postgres
|
||||
version: "3.8"
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10.3
|
||||
environment:
|
||||
POSTGRES_USER: blog
|
||||
POSTGRES_PASSWORD: blog
|
||||
POSTGRES_DB: blog
|
||||
ports:
|
||||
- "3306"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
blog:
|
||||
build: .
|
||||
links:
|
||||
- postgres
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8888:8888"
|
||||
command: --db_host=postgres
|
||||
|
|
Loading…
Reference in New Issue