cli icon indicating copy to clipboard operation
cli copied to clipboard

self-host platform , why need list applications from cli process after filter sidecar process

Open guangdashao opened this issue 4 years ago • 1 comments

Ask your question here

file: /pkg/standalone/list.go

when list all dapr applications frist: filter sidecar process

`

 // Populates the map if all data is available for the sidecar.
for _, proc := range processes {
	executable := strings.ToLower(proc.Executable())
	if (executable == "daprd") || (executable == "daprd.exe") {
		procDetails, err := process.NewProcess(int32(proc.Pid()))
		if err != nil {
			continue
		}

` then: filter cli process

`

   // The master list comes from cli processes, even if sidecar is not up.
for _, proc := range processes {
	executable := strings.ToLower(proc.Executable())
	if (executable == "dapr") || (executable == "dapr.exe") {
		pID := proc.Pid()

`

when run dapr with docker

docker-compose.yaml

`

ems-dapr:
  image: "daprio/dapr:1.3.1"
  container_name: ems_dapr
  init: true
  command: ["./daprd",
   "--app-id", "ems",
   "--log-level","debug",
   "--app-port", "6060",
   "--dapr-http-port","3000",
   "--metrics-port","49090",
   "--dapr-grpc-port", "40000",
   "--config","/dapr/config.yaml"]
  volumes:
      - "/root/.dapr:/dapr"
  depends_on:
    - emsp-backend
  network_mode: "host"

` can't find dapr process image

guangdashao avatar Oct 26 '21 03:10 guangdashao

@guangdashao // The master list comes from cli processes, even if sidecar is not up. does that comment help?

mukundansundar avatar Dec 01 '21 04:12 mukundansundar