blob: 21edded9841ae68723762135fa1dad1e57879dbe [file] [log] [blame]
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = [
"feeds.go",
"main.go",
"views.go",
],
importpath = "code.hackerspace.pl/hscloud/hswaw/site",
visibility = ["//visibility:private"],
deps = [
"//go/mirko:go_default_library",
"//hswaw/site/static:static_go",
"//hswaw/site/templates:templates_go",
"@com_github_golang_glog//:go_default_library",
],
)
go_binary(
name = "site",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
container_image(
name="latest",
base="@prodimage-bionic//image",
files = [":site"],
directory = "/hswaw/site/",
entrypoint = ["/hswaw/site/site"],
)
container_push(
name = "push",
image = ":latest",
format = "Docker",
registry = "registry.k0.hswaw.net",
repository = "q3k/hswaw-site",
tag = "1622585979-{STABLE_GIT_COMMIT}",
)