Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# recent enough version of protobuf-compiler
FROM rust:1-bookworm AS build

RUN apt-get update && apt-get upgrade -y
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y cmake pkg-config libssl-dev librdkafka-dev protobuf-compiler

RUN USER=root cargo new --bin taskbroker
Expand Down Expand Up @@ -41,6 +41,7 @@ RUN groupadd taskbroker --gid 1000 && useradd --gid taskbroker --uid 1000 taskbr
RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl-dev libsqlite3-dev libsqlite3-0 openssl ca-certificates

EXPOSE 50051
EXPOSE 50055
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expose both since IIRC the docker image is used for both cloudbuild (prod) and GHCR (devservices aka local)


# For the sqlite to be mounted too
RUN mkdir /opt/sqlite
Expand All @@ -54,4 +55,4 @@ WORKDIR /opt
CMD ["/opt/taskbroker"]

# To build and run locally:
# docker build -t taskbroker --no-cache . && docker rm taskbroker && docker run --name taskbroker -p 127.0.0.1:50051:50051 -e TASKBROKER_KAFKA_CLUSTER=sentry_kafka:9093 --network sentry taskbroker
# docker build -t taskbroker --no-cache . && docker rm taskbroker && docker run --name taskbroker -p 127.0.0.1:50055:50055 -e TASKBROKER_KAFKA_CLUSTER=sentry_kafka:9093 --network sentry taskbroker
3 changes: 2 additions & 1 deletion devservices/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ services:
environment:
TASKBROKER_KAFKA_CLUSTER: "kafka-kafka-1:9093"
TASKBROKER_CREATE_MISSING_TOPICS: "true"
TASKBROKER_GRPC_PORT: "50055"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only problem is getting the port to be set to 50055 for local development when running taskbroker standalone. Putting an EXPORT TASKBROKER_GRPC_PORT=50055 in either .envrc or a new .env file did not work

I think the current approach should work for the docker container served from devservices, but I think this needs to still work for local taskbroker running side by side without requiring manual intervention from the dev

not sure the best way to accomplish that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the default port for locally run taskbroker would require a config file, or environment vars. We might want to try making all of these changes locally and seeing how colima handles the new port mapping. I suspect that ssh process we saw is how colima implements port forwarding and that getting the connections working can be attributed to running taskbroker outside of colima at the time.

ports:
- 127.0.0.1:50051:50051
- 127.0.0.1:50055:50055
networks:
- devservices
labels:
Expand Down
Loading