Updated the env-var usage, as requested from the review of alexellis on the previous PR by utsavanand2

https://github.com/openfaas/faasd/pull/154#discussion_r608777877

Signed-off-by: Shikachuu <zcmate@gmail.com>
This commit is contained in:
Shikachuu 2021-08-21 13:00:40 +02:00 committed by Alex Ellis
parent 57322c4947
commit 1e9d8fffa0
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Description=faasd-provider
MemoryLimit=500M
Environment="secret_mount_path={{.SecretMountPath}}"
Environment="basic_auth=true"
Environment="hosts_dir=/var/lib/faasd-provider"
ExecStart=/usr/local/bin/faasd provider
Restart=on-failure
RestartSec=10s

View File

@ -247,7 +247,7 @@ func prepareEnv(envProcess string, reqEnvVars map[string]string) []string {
}
func getMounts() []specs.Mount {
wd, _ := os.Getwd()
wd, _ := os.LookupEnv("hosts_dir")
mounts := []specs.Mount{}
mounts = append(mounts, specs.Mount{
Destination: "/etc/resolv.conf",