- `clever_token`: clever_cloud token, mandatory.
- `clever_secret`: clever_cloud secret, mandatory.
- `clever_app`: the id of the app to link, mandatory.
-- `clever_entry_point`: the executable name to be executed by clever cloud, mandatory
- `clever_env`: a dict of environment variables for the application (without add_ons one already available), optional.
- `clever_base_env`: a dict set in vars/main.yml with safe default and mandatory variables for an app to be run on clever. ` clever_base_env | combine(clever_env)` is passed to `clever env` command
- `clever_addons`: a list of dict describing addons enabled for the application from which we would use information during deploy, optional.<br/>
Example: `{ name: pg, env_prefix: POSTGRESQL_ADDON }`
- `clever_app_tasks_file`: tasks file to be executed after environment and addons variables where gathered. Specific to an app, should be use to run migrations. Optional.
+- `clever_haskell_entry_point`: the haskell executable name to be executed by clever cloud, optional.
+- _Obsolete_: `clever_entry_point`: Same as above but was replaced by `clever_haskell_entry_point` since v1.14 of this role.
- `clever_domain`: the domain from which the application should be reachable, optional.
- _Obsolete_: `domain`: Same as above but was replaced by `clever_domain` since v1.4 of this role.
- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`.
clever_app_confdir: "{{ clever_app_root }}/.clever_cloud"
clever_login_file: "{{ clever_app_confdir }}/login"
-clever_entry_point: ""
+clever_haskell_entry_point: "{{ clever_entry_point | default('') }}"
clever_env: {}
clever_metrics: true
- let Addon = ./addon/Addon.dhall
+let Addon = ./addon/Addon.dhall
in λ(Environment : Type)
→ { clever_app :
Text
, clever_app_tasks_file :
Text
- , clever_entry_point :
+ , clever_haskell_entry_point :
Text
, clever_metrics :
Bool
List Addon
, clever_env :
Environment
- }
+ }
\ No newline at end of file
- let Config = ./Config.dhall
+let Config = ./Config.dhall
in let Vault = ./Vault.dhall
-in let Addon = ./addon/Addon.dhall
+ in let Addon = ./addon/Addon.dhall
-in let Environment = ./environment/Environment.dhall
+ in let Environment = ./environment/Environment.dhall
-in let nonifyEmpty =
- λ(opt : Optional Text)
- → Optional/fold Text opt Text (λ(x : Text) → x) "None"
+ in let nonifyEmpty =
+ λ(opt : Optional Text)
+ → Optional/fold Text opt Text (λ(x : Text) → x) "None"
-in λ(vault : Vault)
- → λ(app : Text)
- → λ(entryPoint : Text)
- → λ(metrics : Bool)
- → λ(syslogServer : Optional Text)
- → λ(domain : Optional Text)
- → λ(tasksFile : Optional Text)
- → λ(addons : List Addon)
- → { clever_app =
- app
- , clever_orga =
- vault.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_entry_point =
- entryPoint
- , clever_metrics =
- metrics
- , clever_addons =
- addons
- , clever_env =
- { FORCE_HTTPS = True }
- }
- : Config Environment
+ in λ(vault : Vault)
+ → λ(app : Text)
+ → λ(entryPoint : Optional Text)
+ → λ(metrics : Bool)
+ → λ(syslogServer : Optional Text)
+ → λ(domain : Optional Text)
+ → λ(tasksFile : Optional Text)
+ → λ(addons : List Addon)
+ → { clever_app =
+ app
+ , clever_orga =
+ vault.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
\ No newline at end of file
# vars file for clever
clever_base_env:
CACHE_DEPENDENCIES: "true"
- CC_RUN_COMMAND: "~/.local/bin/{{ clever_entry_point }}"
+ # Haskell only
+ # https://www.clever-cloud.com/doc/get-help/reference-environment-variables/#haskell
+ CC_RUN_COMMAND: "~/.local/bin/{{ clever_haskell_entry_point }}"
ENABLE_METRICS: "{{ clever_metrics | lower }}"
PORT: "8080"