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