Skip to content

Commit

Permalink
Update go settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev committed Sep 17, 2024
1 parent 34a1ebf commit f5fcb5f
Show file tree
Hide file tree
Showing 15 changed files with 359 additions and 333 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
context: shutter
args:
ASSETS_VERSION: shutter-gnosis-1000-set-1v2 # $NETWORK-10*$CHAIN_ID-set-$VERSION
UPSTREAM_VERSION: gnosis-v1.2.1
UPSTREAM_VERSION: gnosis-v1.2.4b1
KEYPER_CONFIG_DIR: /keyper/config
SHUTTER_CHAIN_DIR: /chain
STAKER_SCRIPTS_VERSION: v0.1.0
Expand Down
3 changes: 1 addition & 2 deletions package_variants/gnosis/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
args:
NETWORK: gnosis
CHAIN_PORT: 26656
PROMETHEUS_LISTEN_PORT: 26660
KEYPER_PORT: 23003
KEYPER_METRICS_PORT: 9100

Expand All @@ -17,4 +16,4 @@ services:
- "23003:23003/tcp"
- "26656:26656"
- "26660:26660"
- "9100:9100"
- "9100:9100"
9 changes: 6 additions & 3 deletions shutter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ ARG KEYPER_CONFIG_DIR
ARG SHUTTER_CHAIN_DIR
ARG KEYPER_PORT
ARG CHAIN_PORT
ARG PROMETHEUS_LISTEN_PORT
ARG STAKER_SCRIPTS_VERSION

RUN apt-get update && \
Expand All @@ -32,14 +31,19 @@ ENV SHUTTER_GNOSIS_SM_BLOCKTIME=10 \
KEYPER_GENERATED_CONFIG_FILE=${KEYPER_CONFIG_DIR}/generated.toml \
KEYPER_CONFIG_FILE=${KEYPER_CONFIG_DIR}/keyper.toml \
SHUTTER_CHAIN_DIR=${SHUTTER_CHAIN_DIR} \
KEYPER_PORT=${KEYPER_PORT} \
SHUTTER_CHAIN_CONFIG_FILE=${SHUTTER_CHAIN_DIR}/config/config.toml \
ASSETS_DIR=/assets \
SHUTTER_SETTINGS_SRC_DIR=/usr/src/go-shutter-settings \
STAKER_SCRIPTS_URL=https://github.com/dappnode/staker-package-scripts/releases/download/${STAKER_SCRIPTS_VERSION}

ADD ${STAKER_SCRIPTS_URL}/dvt_lsd_tools.sh /etc/profile.d/

COPY go-shutter-settings ${SHUTTER_SETTINGS_SRC_DIR}
COPY supervisord.conf /etc/supervisord.conf

RUN go build -C ${SHUTTER_SETTINGS_SRC_DIR} -o /usr/local/bin/go_shutter_settings

RUN mkdir -p ${KEYPER_CONFIG_DIR} ${SHUTTER_CHAIN_DIR} ${ASSETS_DIR} /opt/supervisor && \
chmod +rx /etc/profile.d/dvt_lsd_tools.sh

Expand All @@ -48,8 +52,7 @@ COPY --from=assets ${ASSETS_DIR}/ ${ASSETS_DIR}/

# Placed here to rebuild less layers
ENV CHAIN_PORT=${CHAIN_PORT} \
SHUTTER_P2P_LISTENADDRESSES=/ip4/0.0.0.0/tcp/${KEYPER_PORT} \
PROMETHEUS_LISTEN_PORT=${PROMETHEUS_LISTEN_PORT} \
SHUTTER_P2P_LISTENADDRESSES="/ip4/0.0.0.0/tcp/${KEYPER_PORT}" \
NETWORK=${NETWORK}

ENTRYPOINT ["supervisord", "-c", "/etc/supervisord.conf"]
7 changes: 0 additions & 7 deletions shutter/go-dappnode-shutter/go.mod

This file was deleted.

6 changes: 0 additions & 6 deletions shutter/go-dappnode-shutter/go.sum

This file was deleted.

105 changes: 0 additions & 105 deletions shutter/go-dappnode-shutter/settings/chain.go

This file was deleted.

152 changes: 0 additions & 152 deletions shutter/go-dappnode-shutter/settings/keyper.go

This file was deleted.

7 changes: 7 additions & 0 deletions shutter/go-shutter-settings/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module go-shutter-settings

go 1.21.0

require github.com/joho/godotenv v1.5.1

require github.com/pelletier/go-toml/v2 v2.2.3
12 changes: 12 additions & 0 deletions shutter/go-shutter-settings/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading

0 comments on commit f5fcb5f

Please sign in to comment.