From ee64b8e901494ab9996389c1d1d23e4424e7429c Mon Sep 17 00:00:00 2001 From: bodymindarts Date: Mon, 23 Oct 2023 16:17:23 +0200 Subject: [PATCH] chore: add core api to Tiltfile --- dev/Tiltfile | 33 +++++++++++++++++++++++++++++++-- dev/docker-compose.deps.yml | 7 +++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/dev/Tiltfile b/dev/Tiltfile index 4d8e4751cf..728b225ec8 100644 --- a/dev/Tiltfile +++ b/dev/Tiltfile @@ -1,6 +1,8 @@ -docker_compose("./docker-compose.deps.yml", ".env","galoy-dev") - groups = { + "core": [ + "mongodb", + "redis", + ], "bitcoin": [ "lnd1", "bria", @@ -13,8 +15,35 @@ groups = { "otel-agent", ], } + +api_target = "//core/api:api" +local_resource( + "api", + labels = ["core"], + cmd = "buck2 build {}".format(api_target), + serve_cmd = "buck2 run {}".format(api_target), + allow_parallel = True, + readiness_probe = probe( + period_secs = 5, + http_get = http_get_action( + path = "healthz", + port = 4012, + ), + ), + resource_deps = [ + "init-onchain", + "lnd1", + ] +) + +docker_compose("./docker-compose.deps.yml", project_name = "galoy-dev") + for service in groups["bitcoin"]: dc_resource(service, labels = ["bitcoin"]) +for service in groups["tracing"]: + dc_resource(service, labels = ["tracing"]) +for service in groups["core"]: + dc_resource(service, labels = ["core"]) local_resource( name='init-onchain', diff --git a/dev/docker-compose.deps.yml b/dev/docker-compose.deps.yml index 6fdea328e4..c644904b4a 100644 --- a/dev/docker-compose.deps.yml +++ b/dev/docker-compose.deps.yml @@ -1,6 +1,13 @@ --- version: "3" services: + redis: + image: redis:7.0.8 + ports: + - "6379:6379" + environment: + - ALLOW_EMPTY_PASSWORD=yes + - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL mongodb: image: mongo:7.0.2 ports: