aboutsummaryrefslogtreecommitdiffhomepage
path: root/dhall/mkConfig.dhall
blob: bd382de9fd2261c2da89210e7956e543a712c52c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
let Config = ./Config.dhall

in  let Vault = ./Vault.dhall
    
    in  let Addon = ./addon/Addon.dhall
        
        in  let Environment = ./environment/Environment.dhall
            
            in  let nonifyEmpty =
                        λ(opt : Optional Text)
                      → Optional/fold Text opt Text (λ(x : Text) → x) "None"
                
                in    λ(vault : Vault)
                    → λ(app : Text)
                    → λ(organization : Text)
                    → λ(entryPoint : Optional Text)
                    → λ(metrics : Bool)
                    → λ(syslogServer : Optional Text)
                    → λ(domain : Optional Text)
                    → λ(tasksFile : Optional Text)
                    → λ(addons : List Addon)
                    →   { clever_app =
                            app
                        , clever_orga =
                            organization
                        , clever_secret =
                            vault.secret
                        , clever_token =
                            vault.token
                        , clever_syslog_server =
                            nonifyEmpty syslogServer
                        , clever_domain =
                            nonifyEmpty domain
                        , clever_app_tasks_file =
                            nonifyEmpty tasksFile
                        , clever_haskell_entry_point =
                            nonifyEmpty entryPoint
                        , clever_metrics =
                            metrics
                        , clever_addons =
                            addons
                        , clever_env =
                            { FORCE_HTTPS = True }
                        }
                      : Config Environment