Serge Bazanski | 3d116b2 | 2021-03-27 15:43:18 +0000 | [diff] [blame] | 1 | local mirko = import "../../kube/mirko.libsonnet"; |
| 2 | |
| 3 | { |
| 4 | local top = self, |
| 5 | shipstuck:: { |
| 6 | cfg:: { |
Serge Bazanski | 3df9d0c | 2021-03-29 14:23:37 +0000 | [diff] [blame] | 7 | image: "registry.k0.hswaw.net/q3k/shipstuck:315532800-0939d664a3eac4c0c67b447265c67bbcda9939d4", |
Serge Bazanski | 3d116b2 | 2021-03-27 15:43:18 +0000 | [diff] [blame] | 8 | domain: error "domain must be set", |
| 9 | }, |
| 10 | component(cfg, env): mirko.Component(env, "shipstuck") { |
| 11 | local shipstuck = self, |
| 12 | cfg+: { |
| 13 | image: cfg.image, |
| 14 | container: shipstuck.GoContainer("main", "/personal/q3k/shipstuck") { |
| 15 | command+: [ |
| 16 | "-public_address", "0.0.0.0:8080", |
| 17 | ], |
| 18 | }, |
| 19 | ports+: { |
| 20 | publicHTTP: { |
| 21 | public: { |
| 22 | port: 8080, |
| 23 | dns: cfg.domain, |
| 24 | }, |
| 25 | }, |
| 26 | }, |
| 27 | }, |
| 28 | }, |
| 29 | }, |
| 30 | |
| 31 | env(name):: mirko.Environment(name) { |
| 32 | local env = self, |
| 33 | local cfg = self.cfg, |
| 34 | cfg+: { |
| 35 | shipstuck: top.shipstuck.cfg, |
| 36 | }, |
| 37 | components: { |
| 38 | shipstuck: top.shipstuck.component(cfg.shipstuck, env), |
| 39 | }, |
| 40 | }, |
| 41 | |
| 42 | prod: top.env("personal-q3k") { |
| 43 | cfg+: { |
| 44 | shipstuck+: { |
| 45 | domain: "shipstuck.q3k.org", |
| 46 | }, |
| 47 | }, |
| 48 | }, |
| 49 | } |