Skip to content

Commit

Permalink
fix(subscriptions): rebuild image
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoSkorJjj committed Apr 22, 2024
1 parent 1bc058f commit e033167
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/subscriptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./backend/simple/subscriptions/
file: ./backend/simple/subscriptions/Dockerfile
file: ./backend/simple/subscriptions/Subscriptions.Dockerfile
push: true
tags: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ secrets.ECR_REPOSITORY }}:subscriptions
platforms: linux/arm64
30 changes: 30 additions & 0 deletions backend/simple/subscriptions/Subscriptions.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM developwithzt/esd-buf-healthprobe-base:general-1.0 as proto-base
COPY buf.* .
COPY protos/ protos/
RUN buf generate

FROM developwithzt/esd-cpp-grpc-base:multi-platform AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y \
libpqxx-dev \
libpq-dev
COPY CMakeLists.txt .
COPY include/ include/
COPY src/ src/
COPY --from=proto-base /app/pb/ /app/pb/
RUN mkdir build && cd build && cmake .. && make

FROM ubuntu:22.04
WORKDIR /app
RUN apt-get update && apt-get install -y \
libpqxx-6.4 \
libpq5

# Download and install the gRPC health probe, used for checking the health of gRPC applications
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.13 && \
curl -sLo /bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-arm64 && \
chmod +x /bin/grpc_health_probe

COPY --from=builder /app/build/SUBSCRIPTIONS_SERVICE /app/server
CMD ["./server"]

0 comments on commit e033167

Please sign in to comment.