Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 1 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push") |
Serge Bazanski | a767467 | 2021-05-30 21:09:34 +0000 | [diff] [blame] | 2 | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| 3 | |
| 4 | go_library( |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 5 | name = "site_lib", |
Serge Bazanski | 56c888b | 2021-05-30 21:48:58 +0000 | [diff] [blame] | 6 | srcs = [ |
Serge Bazanski | d2271de | 2021-07-11 21:26:37 +0000 | [diff] [blame] | 7 | "at.go", |
Serge Bazanski | 717aad4 | 2021-07-11 16:03:43 +0000 | [diff] [blame] | 8 | "events.go", |
Serge Bazanski | 3c9092a | 2021-05-30 23:15:20 +0000 | [diff] [blame] | 9 | "feeds.go", |
Serge Bazanski | 56c888b | 2021-05-30 21:48:58 +0000 | [diff] [blame] | 10 | "main.go", |
Serge Bazanski | 11b276d | 2021-07-11 23:49:55 +0000 | [diff] [blame] | 11 | "spaceapi.go", |
Serge Bazanski | 56c888b | 2021-05-30 21:48:58 +0000 | [diff] [blame] | 12 | "views.go", |
| 13 | ], |
Serge Bazanski | a767467 | 2021-05-30 21:09:34 +0000 | [diff] [blame] | 14 | importpath = "code.hackerspace.pl/hscloud/hswaw/site", |
| 15 | visibility = ["//visibility:private"], |
| 16 | deps = [ |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 17 | "//go/mirko", |
| 18 | "//hswaw/site/calendar", |
Serge Bazanski | a767467 | 2021-05-30 21:09:34 +0000 | [diff] [blame] | 19 | "//hswaw/site/static:static_go", |
Serge Bazanski | 56c888b | 2021-05-30 21:48:58 +0000 | [diff] [blame] | 20 | "//hswaw/site/templates:templates_go", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 21 | "@com_github_golang_glog//:glog", |
Serge Bazanski | a767467 | 2021-05-30 21:09:34 +0000 | [diff] [blame] | 22 | ], |
| 23 | ) |
| 24 | |
| 25 | go_binary( |
| 26 | name = "site", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 27 | embed = [":site_lib"], |
Serge Bazanski | 80cee0a | 2023-09-22 22:19:33 +0000 | [diff] [blame] | 28 | pure = "on", |
| 29 | static = "on", |
Serge Bazanski | a767467 | 2021-05-30 21:09:34 +0000 | [diff] [blame] | 30 | visibility = ["//visibility:public"], |
| 31 | ) |
Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 32 | |
| 33 | container_image( |
Serge Bazanski | 11b276d | 2021-07-11 23:49:55 +0000 | [diff] [blame] | 34 | name = "latest", |
Serge Bazanski | f642e86 | 2022-02-01 09:46:02 +0000 | [diff] [blame] | 35 | base = "@prodimage-focal//image", |
Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 36 | directory = "/hswaw/site/", |
| 37 | entrypoint = ["/hswaw/site/site"], |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 38 | files = [":site"], |
Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 39 | ) |
| 40 | |
| 41 | container_push( |
| 42 | name = "push", |
Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 43 | format = "Docker", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 44 | image = ":latest", |
Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 45 | registry = "registry.k0.hswaw.net", |
Serge Bazanski | 80cee0a | 2023-09-22 22:19:33 +0000 | [diff] [blame] | 46 | repository = "q3k/hswaw-site", |
| 47 | tag = "1695421189-{STABLE_GIT_COMMIT}", |
Serge Bazanski | 1f06230 | 2021-06-01 22:24:34 +0000 | [diff] [blame] | 48 | ) |