Skip to content

Commit

Permalink
fix: Resolve Proto File Not Found Build Error (#514)
Browse files Browse the repository at this point in the history
Build fails in Dev due to Rpto file not being found. Copying the file
explicitly in the Dockerfile resolves the issue.

Issue was reproducible uding docker compose to build and run image
locally.
  • Loading branch information
darunrs committed Jan 17, 2024
1 parent d403006 commit 420405b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ services:
PORT: 9180
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
RUNNER_HOST: localhost
RUNNER_PORT: 7001
GRPC_SERVER_PORT: 7001

redis:
image: redis
Expand Down
1 change: 1 addition & 0 deletions runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/package*.json ./
RUN npm install --omit=dev
COPY --from=builder /usr/src/app/dist ./dist
COPY protos ./protos
CMD [ "npm", "run", "start:docker" ]
5 changes: 2 additions & 3 deletions runner/src/server/runner-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ export default function startRunnerServer (executors: Map<string, StreamHandler>
server.addService(runnerProto.runner.Runner.service, getRunnerService(executors));
const credentials = grpc.ServerCredentials;

assert(process.env.RUNNER_HOST, 'RUNNER_HOST is not defined');
assert(process.env.RUNNER_PORT, 'RUNNER_PORT is not defined');
assert(process.env.GRPC_SERVER_PORT, 'GRPC_SERVER_PORT is not defined');

server.bindAsync(
`${process.env.RUNNER_HOST}:${process.env.RUNNER_PORT}`,
`localhost:${process.env.GRPC_SERVER_PORT}`,
credentials.createInsecure(), // TODO: Use secure credentials with allow for Coordinator
(err: Error | null, port: number) => {
if (err) {
Expand Down

0 comments on commit 420405b

Please sign in to comment.