mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 08:27:25 +00:00
Fix mongosh, DCA price, compose healthcheck and cleanup
This commit is contained in:
@@ -26,7 +26,7 @@ Docker Compose 提供了丰富的命令来管理项目和容器。本节将详
|
||||
|
||||
**配置验证**:
|
||||
|
||||
- `docker compose config`:验证 docker-compose.yml 格式是否正确
|
||||
- `docker compose config`:验证 compose.yaml (或 docker-compose.yml) 格式是否正确
|
||||
|
||||
### 11.4.1 命令对象与格式
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ services:
|
||||
image: postgres
|
||||
environment:
|
||||
POSTGRES_PASSWORD: 'postgres'
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
web:
|
||||
build: .
|
||||
@@ -13,3 +18,6 @@ services:
|
||||
- .:/code
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user