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", visibility = ["//visibility:public"], ) py3_image( name = "image", srcs = glob(["**/*.py"]), base = "//images/production:base-python-image", data = [ "configs/base.yaml", "configs/logging.yaml", "configs/promotions.yaml", ], main = "main.py", srcs_version = "PY3ONLY", visibility = ["//visibility:public"], deps = [ requirement("aiodns"), requirement("aiohttp"), requirement("aiohttp_socks"), requirement("dateparser"), requirement("pandas"), requirement("pytimeparse"), requirement("python_socks"), requirement("seaborn"), requirement("tenacity"), requirement("uvloop"), "//idm/api/aioclient", requirement("aiobaseclient"), requirement("aiocrossref"), requirement("aiokit"), "//library/configurator", "//library/logging", "//library/telegram", "//nexus/hub/aioclient", "//nexus/meta_api/aioclient", "//nexus/models/proto:proto_py", "//nexus/views/telegram", requirement("izihawa_nlptools"), requirement("izihawa_utils"), ], ) container_push( name = "push-testing", format = "Docker", image = ":image", registry = "registry.infra.svc.cluster.local", repository = "nexus-bot", tag = "testing", ) container_push( name = "push-latest", format = "Docker", image = ":image", registry = "registry.infra.svc.cluster.local", repository = "nexus-bot", tag = "latest", ) container_push( name = "push-public-latest", format = "Docker", image = ":image", registry = "registry.hub.docker.com", repository = "thesuperpirate/nexus-bot", tag = "latest", ) container_push( name = "push-public-testing", format = "Docker", image = ":image", registry = "registry.hub.docker.com", repository = "thesuperpirate/nexus-bot", tag = "testing", )