mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-11-23 11:36:51 +01:00
a683e0ce18
- [nexus] Development GitOrigin-RevId: 5d5feedff7b70be4c788abeb22f89c6758431d33
73 lines
1.7 KiB
Python
73 lines
1.7 KiB
Python
load("@io_bazel_rules_docker//python3:image.bzl", "py3_image")
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
|
|
|
load("@pip_modules//:requirements.bzl", "requirement")
|
|
|
|
alias(
|
|
name = "binary",
|
|
actual = ":image.binary",
|
|
)
|
|
|
|
py3_image(
|
|
name = "image",
|
|
srcs = glob(
|
|
[
|
|
"*.py",
|
|
"configs/**/*.py",
|
|
"daemons/**/*.py",
|
|
"proto/**",
|
|
"services/**",
|
|
],
|
|
exclude = [
|
|
"**/__pycache__/**",
|
|
"**/*.pyc",
|
|
"**/README",
|
|
"**/*.mako",
|
|
"proto/**/*.py",
|
|
],
|
|
),
|
|
base = "//images/production:base-python-image",
|
|
data = [
|
|
"configs/base.yaml",
|
|
"configs/logging.yaml",
|
|
],
|
|
layers = [
|
|
requirement("aiochclient"),
|
|
requirement("aiohttp"),
|
|
requirement("croniter"),
|
|
requirement("grpcio"),
|
|
requirement("pypika"),
|
|
requirement("uvloop"),
|
|
"//idm/api/proto:grpc_py",
|
|
"//idm/api/proto:proto_py",
|
|
"//library/aiogrpctools",
|
|
requirement("aiokit"),
|
|
"//library/aiopostgres",
|
|
requirement("izihawa_configurator"),
|
|
"//library/telegram",
|
|
requirement("izihawa_utils"),
|
|
],
|
|
main = "main.py",
|
|
srcs_version = "PY3ONLY",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
container_push(
|
|
name = "push-testing",
|
|
format = "Docker",
|
|
image = ":image",
|
|
registry = "registry.infra.svc.cluster.local",
|
|
repository = "idm-api",
|
|
tag = "testing",
|
|
)
|
|
|
|
container_push(
|
|
name = "push-latest",
|
|
format = "Docker",
|
|
image = ":image",
|
|
registry = "registry.infra.svc.cluster.local",
|
|
repository = "idm-api",
|
|
tag = "latest",
|
|
)
|
|
|