Atone uses a YAML file to configure the services that needs to be started and managed by Atone. The default configuration file is /etc/atone.yaml
. But, you can set a custom configuration file by setting the --config=<file>
argument when executing atone
command.
If you're new to YAML, you can learn about it on Learn YAML in five minutes or YAML.org.
General settings section for Atone.
The working directory for Atone. This is the directory where the services will be executed by default. By default, the working directory is where the configuration file is located.
The services section is where you define the services that will be managed by Atone.
Each service is defined by a key that will be used to identify the service. The value of the key is a map with the service settings.
The command to be executed by the service. The process started by the command will be monitored and managed by Atone.
A list of services that the service depends on. The service will be started after all the services listed here are started.
Not implemented yet.
The restart policy for the service to automatically restart the service when it exits.
The value must be one of:
no
: Do not automatically restart the container. This is the default.always
: Always restart the service.on-failure
: Restart the service if it exits with a non-zero exit code.unless-stopped
: Restart the service unless it was explicitly stopped.
A list of cron-like expression schedules that the service will be started. The service will be started when one of the schedules matches the current time. The syntax of the expression is the same as the cron command (with only five fields of the time expression).
Only one instance of the service will be started. If the service is already running, the service will not be started again.
Not setting the schedule
value means that the service will be started when Atone starts. The same as setting the schedule
value to @reboot
.
Not implemented yet.