hswaw/site: deploy

Change-Id: I2ea68f07c81859ffea99ad5b107b14876422288b
changes/62/1062/1
q3k 2021-08-30 20:14:58 +00:00
parent d88a2e2377
commit d0c9c414cf
3 changed files with 33 additions and 1 deletions

View File

@ -7,6 +7,7 @@ local teleimg = import "teleimg.libsonnet";
local frab = import "frab.libsonnet";
local pretalx = import "pretalx.libsonnet";
local cebulacamp = import "cebulacamp.libsonnet";
local site = import "site.libsonnet";
{
hswaw(name):: mirko.Environment(name) {
@ -20,6 +21,7 @@ local cebulacamp = import "cebulacamp.libsonnet";
frab: frab.cfg,
pretalx: pretalx.cfg,
cebulacamp: cebulacamp.cfg,
site: site.cfg,
},
components: {
@ -30,6 +32,7 @@ local cebulacamp = import "cebulacamp.libsonnet";
frab: frab.component(cfg.frab, env),
pretalx: pretalx.component(cfg.pretalx, env),
cebulacamp: cebulacamp.component(cfg.cebulacamp, env),
site: site.component(cfg.site, env),
},
},
@ -69,6 +72,9 @@ local cebulacamp = import "cebulacamp.libsonnet";
cebulacamp+: {
webFQDN: "cebula.camp",
},
site+: {
webFQDN: "new.hackerspace.pl",
},
},
},
}

26
hswaw/kube/site.libsonnet Normal file
View File

@ -0,0 +1,26 @@
local mirko = import "../../kube/mirko.libsonnet";
local kube = import "../../kube/kube.libsonnet";
{
cfg:: {
image: "registry.k0.hswaw.net/q3k/hswaw-site:1630354516-e2bbf5901bcc2c3c260455017fafa1728568d1c2",
webFQDN: error "webFQDN must be set",
},
component(cfg, env):: mirko.Component(env, "site") {
local site = self,
cfg+: {
image: cfg.image,
container: site.GoContainer("main", "/hswaw/site/site") {
},
ports+: {
publicHTTP: {
web: {
port: 8080,
dns: cfg.webFQDN,
}
},
},
},
},
}

View File

@ -42,5 +42,5 @@ container_push(
format = "Docker",
registry = "registry.k0.hswaw.net",
repository = "q3k/hswaw-site",
tag = "1626124964-{STABLE_GIT_COMMIT}",
tag = "1630354516-{STABLE_GIT_COMMIT}",
)