| 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 = "site_lib", |
| srcs = [ |
| "at.go", |
| "events.go", |
| "feeds.go", |
| "main.go", |
| "spaceapi.go", |
| "views.go", |
| ], |
| importpath = "code.hackerspace.pl/hscloud/hswaw/site", |
| visibility = ["//visibility:private"], |
| deps = [ |
| "//hswaw/site/calendar", |
| "//hswaw/site/static:static_go", |
| "//hswaw/site/templates:templates_go", |
| "@com_github_golang_glog//:glog", |
| ], |
| ) |
| |
| go_binary( |
| name = "site", |
| embed = [":site_lib"], |
| pure = "on", |
| static = "on", |
| visibility = ["//visibility:public"], |
| ) |
| |
| container_image( |
| name = "latest", |
| base = "@prodimage-focal//image", |
| directory = "/hswaw/site/", |
| entrypoint = ["/hswaw/site/site"], |
| files = [":site"], |
| ) |
| |
| container_push( |
| name = "push", |
| format = "Docker", |
| image = ":latest", |
| registry = "registry.k0.hswaw.net", |
| repository = "q3k/hswaw-site", |
| tag = "1705442379-{STABLE_GIT_COMMIT}", |
| ) |