Explita InfraExplita Infra
DeployCLI Reference

Process & Container Lifecycle (eda start, stop, restart)

Start, stop, and restart deployed containers with graceful connection draining

Explita Deploy provides direct commands to manage container runtime states without requiring SSH shell access to the host machine.

eda start [options]
eda stop [options]
eda restart [options]

1. Start Application (eda start)

Start a stopped application container:

eda start [-a <appId>]

Execution Details:

  1. Boots the existing stopped container in place (docker start).
  2. Preserves the container ID, container name, and any mounted filesystem volumes.
  3. Restores Caddy reverse-proxy routing and re-attaches active public tunnels and scheduled cron workers.

2. Stop Application (eda stop)

Gracefully stop an application container:

eda stop [-a <appId>]

Execution Details:

  1. Caddy immediately stops forwarding incoming requests to the container (new requests receive a clean 503 or 404).
  2. Sends SIGTERM to the container process.
  3. Grants a 10-second grace window for active HTTP connections and ongoing background workers to finish processing.
  4. Sends SIGKILL if the container process has not exited after the grace timeout.

3. Restart Application (eda restart)

Reboot an active application container process:

eda restart [-a <appId>] [--recreate]
OptionDescription
-a, --app <appId>Target application ID (or resolved from explita.json).
--recreateRecreate container with fresh environment variables using zero-downtime traffic cutover.

Key Use Cases:

  • Fast In-Place Restart (default): Quickly reboot an un-responsive process or clear memory heaps without changing the container identity or container ID.
  • Environment Refresh (--recreate or eda env apply): Recreate the container with fresh decrypted environment variables from eda env set without triggering a full rebuild.

Zero-Downtime Guarantee with --recreate:

When --recreate is passed (or when executing eda env apply), the server spins up a candidate container first, runs the readiness health check, swaps Caddy upstream proxy targets, and only then tears down the previous container. Incoming web traffic experiences zero dropped packets.

On this page