@@ -37,14 +37,30 @@ RUN apk add --no-cache ca-certificates geos && \
3737USER peerdb
3838WORKDIR /home/peerdb
3939COPY --from=builder --chown=peerdb /root/peer-flow .
40+ ENTRYPOINT [ "/home/peerdb/peer-flow" ]
41+
42+ # Debug Image with Delve installed and the binary built with debug flags
43+ FROM flow-base AS flow-base-debug
44+ USER root
45+ COPY --from=builder /go/bin/dlv /usr/local/bin/dlv
46+ EXPOSE 40000
47+ ENTRYPOINT ["dlv" , "--headless" , "--continue" , "--accept-multiclient" , "--listen=:40000" , "--api-version=2" , "exec" , "/home/peerdb/peer-flow" , "--" ]
4048
4149FROM flow-base AS flow-api
4250
4351ARG PEERDB_VERSION_SHA_SHORT
4452ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
4553
4654EXPOSE 8112 8113
47- ENTRYPOINT ["./peer-flow" , "api" , "--port" , "8112" , "--gateway-port" , "8113" ]
55+ CMD ["api" , "--port" , "8112" , "--gateway-port" , "8113" ]
56+
57+ FROM flow-base-debug AS flow-api-debug
58+
59+ ARG PEERDB_VERSION_SHA_SHORT
60+ ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
61+
62+ EXPOSE 8112 8113
63+ CMD ["api" , "--port" , "8112" , "--gateway-port" , "8113" ]
4864
4965FROM flow-base AS flow-worker
5066
@@ -54,28 +70,31 @@ ENV OTEL_EXPORTER_OTLP_COMPRESSION=gzip
5470ARG PEERDB_VERSION_SHA_SHORT
5571ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
5672
57- ENTRYPOINT ["./peer-flow" , "worker" ]
73+ CMD ["worker" ]
74+
75+ FROM flow-base-debug AS flow-worker-debug
76+ ENV OTEL_METRIC_EXPORT_INTERVAL=10000
77+ ENV OTEL_EXPORTER_OTLP_COMPRESSION=gzip
78+ ARG PEERDB_VERSION_SHA_SHORT
79+ ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
80+ CMD ["./peer-flow" , "--" , "worker" ]
81+
5882
5983FROM flow-base AS flow-snapshot-worker
6084
6185ARG PEERDB_VERSION_SHA_SHORT
6286ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
63- ENTRYPOINT [ "./peer-flow" , "snapshot-worker" ]
87+ CMD [ "snapshot-worker" ]
6488
89+ FROM flow-base-debug AS flow-snapshot-worker-debug
6590
66- FROM flow-base AS flow-worker-debug
67- ENV OTEL_METRIC_EXPORT_INTERVAL=10000
68- ENV OTEL_EXPORTER_OTLP_COMPRESSION=gzip
6991ARG PEERDB_VERSION_SHA_SHORT
7092ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
71- USER root
72- COPY --from=builder /go/bin/dlv /usr/local/bin/dlv
73- USER peerdb
74- EXPOSE 40000
75- ENTRYPOINT ["dlv" , "--headless" , "--continue" , "--accept-multiclient" , "--listen=:40000" , "--api-version=2" , "exec" , "./peer-flow" , "--" , "worker" ]
93+ CMD ["snapshot-worker" ]
94+
7695
7796FROM flow-base AS flow-maintenance
7897
7998ARG PEERDB_VERSION_SHA_SHORT
8099ENV PEERDB_VERSION_SHA_SHORT=${PEERDB_VERSION_SHA_SHORT}
81- ENTRYPOINT [ "./peer-flow" , "maintenance" ]
100+ CMD [ "maintenance" ]
0 commit comments