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 | a4ae66b | 2021-03-29 13:26:37 +0000 | [diff] [blame^] | 7 | image: "registry.k0.hswaw.net/q3k/shipstuck:315532800-83918968ad5abe42be32f55fe1037d3fa8e74d16", |
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 | } |