Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Jul 13:10

Added

  • servicrab exec <SERVICE> -- <COMMAND>..., for the questions that start with
    "but what does the service actually see?":

    servicrab exec api -- printenv DATABASE_URL
    servicrab exec api -- npm run migrate
    servicrab exec db -- psql

    It runs the command with the service's merged environment, its env_file
    layers and its working directory, assembled by the same code that starts the
    service, so the two cannot drift apart. The command inherits servicrab's
    stdio — interactive tools and pipes work, and nothing of servicrab's own
    reaches the output — and its exit status is passed through, with 127 for a
    command that does not exist and 126 for one that is not executable, as a
    shell would.

    Unlike docker exec it does not enter a running process: no daemon is
    involved and no namespace is joined. That is the point. Debugging a service
    that refuses to start is exactly when there is nothing to attach to, and it is
    also the limit — a variable the process changed after startup is not visible
    here.

    Everything after the service name belongs to the command, including its own
    flags.