mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-21 20:35:27 +00:00
1.3 KiB
1.3 KiB
title, weight, aliases
| title | weight | aliases | |
|---|---|---|---|
| Environment | 143 |
|
The environment key can be used to customize system services. When a value is not assigned, RancherOS looks up the value from the rancher.environment key.
In the example below, ETCD_DISCOVERY will be set to https://discovery.etcd.io/d1cd18f5ee1c1e2223aed6a1734719f7 for the etcd service.
rancher:
environment:
ETCD_DISCOVERY: https://discovery.etcd.io/d1cd18f5ee1c1e2223aed6a1734719f7
services:
etcd:
...
environment:
- ETCD_DISCOVERY
Wildcard globbing is also supported. In the example below, ETCD_DISCOVERY will be set as in the previous example, along with any other environment variables beginning with ETCD_.
rancher:
environment:
ETCD_DISCOVERY: https://discovery.etcd.io/d1cd18f5ee1c1e2223aed6a1734719f7
services:
etcd:
...
environment:
- ETCD_*
Available as of v1.2
There is also a way to extend PATH environment variable, PATH or path can be set, and multiple values can be comma-separated. Note that need to reboot before taking effect.
rancher:
environment:
path: /opt/bin,/home/rancher/bin