F1bonacc1 / process-compose

Process Compose is a simple and flexible scheduler and orchestrator to manage non-containerized applications.
https://f1bonacc1.github.io/process-compose/
Apache License 2.0
1.34k stars 52 forks source link

PC_REPLICA_NUMBER not available as environment variable #248

Closed l-monninger closed 2 months ago

l-monninger commented 2 months ago

Defect

Make sure that these boxes are checked before submitting your issue -- thank you!

Version of process-compose: 1.27

OS environment: MacOS, Sonoma 14.5

Steps or code to reproduce the issue:

# process-compose.yml
version: "1.27"

processes:

  say-replica-num:
    command: |
     echo $PC_REPLICA_NUM
    replicas: 2

Run:

process-compose up -t=false

Expected result:

[say-replica-num-1      ] 1 
[say-replica-num-0      ] 0

Actual result:

[say-replica-num-1      ] 
[say-replica-num-0      ] 
l-monninger commented 2 months ago

Further, the whole environment does not appear to be working...

# process-compose.yml
version: "1.27"

processes:

  say-replica-num:
    environment:
      - "PC_REPLICA_NUM=1"
    command: |
     echo $PC_REPLICA_NUM
F1bonacc1 commented 2 months ago

Duplicae of #120 Also please check the documentation.

F1bonacc1 commented 2 months ago

From docs:

processes:

  say-replica-num:
    command: |
     echo $$PC_REPLICA_NUM
    replicas: 2