compose.yaml:services:

db:

image: postgres:16

environment:

POSTGRES_PASSWORD: secret

healthcheck:

test: ["CMD-SHELL", "pg_isready -U postgres"]

interval: 10s

timeout: 3s

retries: 10

networks: [appnet]

restart: unless-stopped

web:

image: nginx:1.25-alpine

depends_on:

db:

condition: service_healthy

ports:

- "8080:80"

networks: [appnet]

profiles: ["dev"]

restart: unless-stopped

networks:

appnet: {}

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部