diff options
author | Vincent Ambo <tazjin@google.com> | 2019-10-28T17·19+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-10-28T21·31+0100 |
commit | 790bce219cf9acf01de3257fcf137a0a2833529e (patch) | |
tree | a26922af66344e3d08d42b87e50371e1f888bdc4 /tools/nixery/server/config/config.go | |
parent | 167a0b32630ed86b3a053e56fa499957872d7b38 (diff) |
feat(server): Add filesystem storage backend config options
The filesystem storage backend can be enabled by setting `NIXERY_STORAGE_BACKEND` to `filesystem` and `STORAGE_PATH` to a disk location from which Nixery can serve files.
Diffstat (limited to 'tools/nixery/server/config/config.go')
-rw-r--r-- | tools/nixery/server/config/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/nixery/server/config/config.go b/tools/nixery/server/config/config.go index 6cc69fa1f599..7ec102bd6cee 100644 --- a/tools/nixery/server/config/config.go +++ b/tools/nixery/server/config/config.go @@ -42,6 +42,7 @@ type Backend int const ( GCS = iota + FileSystem ) // Config holds the Nixery configuration options. @@ -64,6 +65,8 @@ func FromEnv() (Config, error) { switch os.Getenv("NIXERY_STORAGE_BACKEND") { case "gcs": b = GCS + case "filesystem": + b = FileSystem default: log.WithField("values", []string{ "gcs", |