diff --git a/docker-compose.yml b/docker-compose.yml index c9230fa..4c36abb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,29 +6,26 @@ networks: services: stat_consumer: + networks: + - lubso build: # Shreyas: # Context is build context given to dockerfile, # it is relative to compose root # for example, when copying it is the relative path the copy will use - context: ./ + context: ./stat_consumer # Docker file is path to file, can go deeper / up if needed dockerfile: Dockerfile # Target is the build target to STOP building at (multi-stage) target: dev - - # image: cosmtrek/air - # networks: - # - lubso - # working_dir: "/usr/src/app" - # ports: - # - 8001:9000 - # - 2345:2345 - # environment: - # KAFKA_BROKER_ADDRS: "kafka:9092" - # PPROF_ENDPOINTS: "true" - # volumes: - # - "./stat_consumer/:/usr/src/app" + ports: + - 8001:9000 + - 2345:2345 + volumes: + - "./stat_consumer/:/usr/src/app" + environment: + KAFKA_BROKER_ADDRS: "kafka:9092" + PPROF_ENDPOINTS: "true" stat_processor: ports: diff --git a/stat_consumer/Dockerfile b/stat_consumer/Dockerfile index eeb0bd2..0b1cfd3 100644 --- a/stat_consumer/Dockerfile +++ b/stat_consumer/Dockerfile @@ -12,6 +12,7 @@ WORKDIR /usr/src/app RUN go get -u github.com/cosmtrek/air && go install github.com/go-delve/delve/cmd/dlv@latest EXPOSE 9000 EXPOSE 2345 +ENTRYPOINT ["air"] ######### # BUILD #