I have the following docker-compose.yml
file which specifies that the backend
service should wait until the postgres
service is healthy before starting the backend
service. Apparently, postgres
service is already healthy even if it is still running its startup script.
这是我的<代码>docker-compose.yml文档。
version: "3.7"
services:
backend:
build: .
ports:
- "8080:8080"
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:13
ports:
- "${DB_PORT}:${DB_PORT}"
env_file:
- .env
volumes:
- ./initdb.d:/docker-entrypoint-initdb.d
- data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 10s
retries: 5
volumes:
data:
我正在制作一份开张,在<条码>上运行一段时间。 启动书将用1Mrows向非洲开发银行分发。 如同开端文字运行一样,<编码>背后编码>服务可与<代码>postgres连接。 现在,我的最佳解决办法只是增加<条码>,即:无机:<>/条码>,以等待开篇文字的填写。 是否有更强有力的办法实现这一目标?