hyperboria/idm/api/BUILD.bazel
the-superpirate 9ce67ec590 - feat(pylon): Refactor code
- feat(idm): Rename IDM-2 to IDM
  - feat(idm): Open IDM
3 internal commit(s)

GitOrigin-RevId: e302e9b5cda18cca1adc4ae8a3d906714d222106
2021-04-12 23:38:54 +03:00

71 lines
1.6 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",
"models/**",
"proto/**",
"services/**",
],
exclude = [
"**/__pycache__/**",
"**/*.pyc",
"**/README",
"**/*.mako",
"proto/**/*.py",
],
),
base = "//images/production:base-python-image",
data = [
"configs/base.yaml",
"configs/logging.yaml",
],
layers = [
requirement("grpcio"),
requirement("pypika"),
requirement("uvloop"),
"//idm/api/proto:idm_grpc_py",
"//idm/api/proto:idm_proto_py",
"//library/aiogrpctools",
requirement("aiokit"),
"//library/aiopostgres",
"//library/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.example.com",
repository = "idm-api",
tag = "testing",
)
container_push(
name = "push-latest",
format = "Docker",
image = ":image",
registry = "registry.example.com",
repository = "idm-api",
tag = "latest",
)