Алгоритмы
- 1 ответ
- 0 вопросов
1
Вклад в тег
networks:
kinonetwork:
driver: bridge
yarn build возникает раньше, чем запускается бд
version: '3.8'
services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
POSTGRES_DB: mydb
restart: always
ports:
- '5432:5432'
networks:
- kinonetwork
healthcheck:
test: pg_isready -d mydb
interval: 10s
timeout: 5s
start_period: 10s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file:
- ./backend/.env
ports:
- '4200:4200'
networks:
- kinonetwork
depends_on:
postgres:
condition: service_healthy