| 1 | amends "../../config/Service.pkl" |
| 2 | |
| 3 | import "../../config/site.pkl" as site |
| 4 | |
| 5 | name = "Clover DB" |
| 6 | launcher = false |
| 7 | |
| 8 | local isTest = site.domain.endsWith(".test") |
| 9 | |
| 10 | secrets = if (isTest) new { ["key"] {} } else new {} |
| 11 | requiredSecrets = if (isTest) new {} else new { "key" } |
| 12 | |
| 13 | container { |
| 14 | build = "build" |
| 15 | cpu = 1000 |
| 16 | memory = 20480 |
| 17 | |
| 18 | http { |
| 19 | containerPort = 8080 |
| 20 | subdomain = "db" |
| 21 | } |
| 22 | |
| 23 | volumes { |
| 24 | ["/data"] {} |
| 25 | ["/published"] { src = "\(site.cloverRoot)/Published" } |
| 26 | } |
| 27 | |
| 28 | env { |
| 29 | ["PORT"] = "8080" |
| 30 | ["CLOVER_DB"] = "/data" |
| 31 | ["CLOVER_FILE_RAW"] = "/published" |
| 32 | ["CLOVER_FILE_DERIVED"] = "/data/derived" |
| 33 | ["CLOVER_SOT_KEY"] = "${secret.own.key}" |
| 34 | ["CLOVER_INDEX_CORES"] = "4" |
| 35 | ["CLOVER_INDEXER"] = if (site.pool == "snowglobe-demo") "0" else "1" |
| 36 | } |
| 37 | } |