@@ -23,9 +23,14 @@ import (
23
23
24
24
func server () * cobra.Command {
25
25
vip := deployment .DefaultViper ()
26
- cmd := agpl .Server (dflags , func (ctx context.Context , options * agplcoderd.Options ) (* agplcoderd.API , io.Closer , error ) {
27
- if dflags .DerpServerRelayAddress .Value != "" {
28
- _ , err := url .Parse (dflags .DerpServerRelayAddress .Value )
26
+ cmd := agpl .Server (vip , func (ctx context.Context , options * agplcoderd.Options ) (* agplcoderd.API , io.Closer , error ) {
27
+ cfg , err := deployment .Config (vip )
28
+ if err != nil {
29
+ return nil , nil , xerrors .Errorf ("failed to read config: %w" , err )
30
+ }
31
+
32
+ if cfg .DerpServerRelayAddress != "" {
33
+ _ , err := url .Parse (cfg .DerpServerRelayAddress )
29
34
if err != nil {
30
35
return nil , nil , xerrors .Errorf ("derp-server-relay-address must be a valid HTTP URL: %w" , err )
31
36
}
@@ -53,7 +58,7 @@ func server() *cobra.Command {
53
58
BrowserOnly : options .DeploymentConfig .BrowserOnly ,
54
59
SCIMAPIKey : []byte (options .DeploymentConfig .SCIMAuthHeader ),
55
60
UserWorkspaceQuota : options .DeploymentConfig .UserWorkspaceQuota ,
56
- RBACEnabled : true ,
61
+ RBAC : true ,
57
62
DERPServerRelayAddress : options .DeploymentConfig .DerpServerRelayAddress ,
58
63
DERPServerRegionID : options .DeploymentConfig .DerpServerRegionID ,
59
64
0 commit comments