-
Notifications
You must be signed in to change notification settings - Fork 126
/
Dockerfile.staging
24 lines (17 loc) · 1020 Bytes
/
Dockerfile.staging
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:1.23
ARG chain="polkadot"
ARG basepath="~/.local/share/gossamer"
ARG DD_API_KEY
ENV chain=${chain}
ENV GSSMRHOME=${basepath}
ENV DD_API_KEY=${DD_API_KEY}
ENV DD_HOSTNAME=${chain}-host
RUN ["sh", "-c", "DD_AGENT_MAJOR_VERSION=7 DD_INSTALL_ONLY=true DD_API_KEY=${DD_API_KEY} DD_SITE=\"datadoghq.com\" bash -c \"$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)\""]
WORKDIR /gossamer
COPY . .
RUN ["sh", "-c", "mv .github/workflows/staging/openmetrics.d/${chain}-conf.yaml /etc/datadog-agent/conf.d/openmetrics.d/conf.yaml"]
RUN go get ./...
RUN go install -trimpath github.com/ChainSafe/gossamer/cmd/gossamer
RUN ["sh", "-c", "gossamer init --chain=${chain} --base-path=${basepath}/${chain}"]
ENTRYPOINT ["sh", "-c", "service datadog-agent start && gossamer --chain=${chain} --base-path=${basepath}/${chain} --rpc-external=true --unsafe-rpc=true --prometheus-external --prometheus-port=9876 --pprof.enabled --pprof.listening-address=\":6060\""]
EXPOSE 7001 8545 8546 8540 9876 6060