| local mirko = import "../../kube/mirko.libsonnet"; |
| |
| { |
| local top = self, |
| shipstuck:: { |
| cfg:: { |
| image: "registry.k0.hswaw.net/q3k/shipstuck:315532800-0939d664a3eac4c0c67b447265c67bbcda9939d4", |
| domain: error "domain must be set", |
| }, |
| component(cfg, env): mirko.Component(env, "shipstuck") { |
| local shipstuck = self, |
| cfg+: { |
| image: cfg.image, |
| container: shipstuck.GoContainer("main", "/personal/q3k/shipstuck") { |
| command+: [ |
| "-public_address", "0.0.0.0:8080", |
| ], |
| }, |
| ports+: { |
| publicHTTP: { |
| public: { |
| port: 8080, |
| dns: cfg.domain, |
| }, |
| }, |
| }, |
| }, |
| }, |
| }, |
| |
| env(name):: mirko.Environment(name) { |
| local env = self, |
| local cfg = self.cfg, |
| cfg+: { |
| shipstuck: top.shipstuck.cfg, |
| }, |
| components: { |
| shipstuck: top.shipstuck.component(cfg.shipstuck, env), |
| }, |
| }, |
| |
| prod: top.env("personal-q3k") { |
| cfg+: { |
| shipstuck+: { |
| domain: "shipstuck.q3k.org", |
| }, |
| }, |
| }, |
| } |