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

Make COSMOVISOR_ENABLED and START_CMD work as intended #528

Merged

Commits on Jun 18, 2023

  1. Make COSMOVISOR_ENABLED and START_CMD work as intended

    Teach the run.sh to use START_CMD if set, even when SNAPSHOT_PATH is unused
    (previously, it would exec whatever command line passed to the docker, or do
    nothing if none).
    
    This also fixes the case of COSMOVISOR_ENABLED=1, which sets START_CMD to
    start cosmovisor but then was not actually run before.
    orenl-lava committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    21aba8a View commit details
    Browse the repository at this point in the history
  2. Make COSMOVISOR_ENABLED and START_CMD work as intended (take 2)

    Users generally want to:
    
    1. Run the blockchain binary either as-is, -or- with snapshot.sh, -or- with
    cosmovisor. These are controlled `SNAPSHOT_PATH`, and `COSMOVISOR_ENABLED`.
    
    and then:
    
    2. Be able to set the blockchain binary command to something else than the
    default "start". This can be done with `START_CMD` - to amend/override that
    command via environment variables without changes to deployment logic - e.g.
    docker-compose yml (unlike with command line args to "docker run ...").
    
    So change the logic to be: "use rule 1 above for prefix, then if args exists
    then use them, else if `START_CMD` exists then use it, else use `start`". I
    amended the PR accordingly.
    orenl-lava committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    6538e60 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2023

  1. Make COSMOVISOR_ENABLED and START_CMD work as intended (take 3)

    With the "CMD $START_CMD" directive ("shell form") docker starts the container
    with "$ENTRYPOINT /bin/sh -c $START_CMD". This is bad because it breaks both
    cosmovisor and snapshot.sh (the latter has an explicit workaround). It is also
    unnecessary because the $START_CMD can (and should) be enforced by `run.sh`.
    
    Remove "CMD $START_CMD", since it is passed in the env and handled anyhow by
    `run.sh`. Replace with "CMD []" to un-inherit any "CMD" directives from parent
    images.
    orenl-lava committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    9bf1a79 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. Configuration menu
    Copy the full SHA
    f11727e View commit details
    Browse the repository at this point in the history