blob: db7750e84f3b0ab4d4fa43f06195eb4f7bf1290f [file] [log] [blame]
local mirko = import "../../kube/mirko.libsonnet";
{
local top = self,
shipstuck:: {
cfg:: {
image: "registry.k0.hswaw.net/q3k/shipstuck:315532800-a7282b5aa2952e5eb66a1c3ecf7cdafef8335aba",
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",
},
},
},
}