services: api: build: context: ./api dockerfile: Dockerfile.dev restart: on-failure volumes: - ./api:/app env_file: - ./.env ports: - 1597:1597 depends_on: postgres: condition: service_healthy postgres: image: postgres:15 restart: on-failure env_file: - ./.env ports: - "5432:5432" volumes: - db:/var/lib/postgresql/data - ./sql/create.sql:/docker-entrypoint-initdb.d/init.sql command: ["postgres", "-c", "log_statement=all"] healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 web: build: context: ./web dockerfile: Dockerfile.dev restart: on-failure volumes: - ./web:/app ports: - 5173:5173 environment: - API_URL=http://api:1597 depends_on: - api volumes: db: