Skip to content

The container start before the cassandra db is up #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NIKFIORE opened this issue Jun 14, 2024 · 1 comment
Closed

The container start before the cassandra db is up #282

NIKFIORE opened this issue Jun 14, 2024 · 1 comment

Comments

@NIKFIORE
Copy link

I tried to use the healtcheck , and playing with the time variable to find a right tempistic but it didn't work

this is my docker-compose file:

services:
  app:
    build: 
      context: .
      dockerfile: ./Dockerfile
    volumes:
      - .:/app
    container_name: app-container
    depends_on:
      database:
        condition: service_healthy

  database:
    image: cassandra:latest
    ports:
      - 9042:9042
    container_name: cassandra-study-container
    healthcheck:
      test: ["CMD", "cqlsh", "-e", "describe keyspace"]
      interval: 30s
      timeout: 10s
      retries: 5
@tianon
Copy link
Member

tianon commented Jun 14, 2024

Sorry, but this isn't going to be something we can give a generic answer to - it's going to be really variable depending on your infrastructure (available resources, etc).

@tianon tianon closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants