mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 16:37:34 +00:00
24 lines
409 B
Go
24 lines
409 B
Go
|
|
services:
|
|
|
|
db:
|
|
image: postgres
|
|
environment:
|
|
POSTGRES_PASSWORD: 'postgres'
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
web:
|
|
build: .
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
volumes:
|
|
- .:/code
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|