Skip to content
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

Missing Dapr Applications in the dashboard if we use env_file in docker compose #275

Open
valentin-pouget-forge opened this issue Jul 8, 2024 · 0 comments
Labels

Comments

@valentin-pouget-forge
Copy link

Expected Behavior

I would expect the dashboard to display all the Dapr Applications in the Overview.

Actual Behavior

Given I run the dashboard using the docker compose = true
When any of my other service (simple dotnet app) uses the env_file: property
Then the dashboard would show an empty Dapr Applications in the Overview page.

Steps to Reproduce the Problem

Create a simple docker compose file with one service and

MyService:
    image: ${REGISTRY:-r}/myservice:${TAG:-latest}
    build:
      context: .
      dockerfile: src/MyService/Dockerfile.local
    env_file:
      - ${HOST_WORKSPACE_PATH}/infra/dapr/envs/var-features.env

, one dapr sidecar based on image: "daprio/daprd:latest" with

  MyService-dapr:
    image: "daprio/daprd:latest"
    network_mode: "service:MyService"
    command:
      [
        "./daprd",
        "-app-id",
        "myservice",
        "-app-port",
        "80",
        "-resources-path",
        "/components",
        "-config",
        "/configuration/broker-platform-config.yaml",
        "--log-as-json",
        "true",
      ]

, and one dashboard with image: "daprio/dashboard:latest" and

   dapr-dashboard:
    image: "daprio/dashboard:latest"
   command:
      [
        "--docker-compose=true",
        "--components-path=/components",
        "--config-path=/configuration",
        "--docker-compose-path=/home/nonroot/docker-compose.yml",
      ]
      volumes:
      - "${HOST_WORKSPACE_PATH}/docker-compose.yml:/home/nonroot/docker-compose.yml"
      - "${HOST_WORKSPACE_PATH}/infra/dapr/components/:/components"
      - "${HOST_WORKSPACE_PATH}/infra/dapr/configuration/:/configuration"

Then if we open the logs for the dashboard, we can observe this line, even though the image for the dashboard should not load the .env files:
024/07/08 09:43:57 Failed to load /infra/dapr/envs/var-features.env: open /infra/dapr/envs/var-features.env: no such file or directory

Release Note

FIX env_file to be use for another service does not break initialization of the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant