Skip to main content

restart

Restart services with zero downtime.

$ sysg restart

Options

--config

Path to the configuration file. When specified, reloads the configuration and restarts all services with the new settings.

$ sysg restart --config production.yaml

--service

Name of a specific service to restart. If not specified, all services are restarted.

$ sysg restart --service api

--daemonize

Start the supervisor before restarting if it isn't already running.

$ sysg restart --daemonize

--sys

Opt into privileged system mode. Requires running as root.

$ sudo sysg restart --sys

--drop-privileges

Drop privileges after performing privileged setup.

$ sudo sysg restart --sys --drop-privileges

--log-level

Set logging verbosity for this invocation. Accepts named levels (trace, debug, info, warn, error, off) or numeric values (5-0).

$ sysg restart --log-level debug

Examples

Restart all services

$ sysg restart

Restart specific service

$ sysg restart --service api

Restart with new configuration

$ sysg restart --config production.yaml

Reloads configuration and restarts all services.

Deployment strategies

Services configured with deployment.strategy: rolling get zero-downtime restarts:

  1. New instance starts
  2. Health checks pass
  3. Old instance receives SIGTERM
  4. Grace period allows requests to complete
  5. Old instance stops

Services without rolling deployment stop then start.

See also