Skip to content

Commit

Permalink
refactor: remove process-compose and individual start scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Prad N committed Jan 10, 2025
1 parent 2d3d192 commit a06bae6
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 206 deletions.
Empty file added .github/deploy.yml
Empty file.
52 changes: 52 additions & 0 deletions .github/deploy/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: sonr-testnet
version: 0.2.20

chains:
- id: sonr-test
name: custom
image: ghcr.io/onsonr/sonr:latest
home: /root/.sonr
binary: sonrd
prefix: idx
denom: usnr
coins: 100000000000000usnr,100000000000000snr
repo: https://github.com/onsonr/sonr
ports:
rest: 1317
rpc: 26657
faucet: 8001

- id: osmosis-1
name: osmosis
numValidators: 2
ports:
rest: 1313
rpc: 26653
faucet: 8003

- id: cosmoshub-4
name: cosmoshub
numValidators: 2
ports:
rest: 1319
rpc: 26659
faucet: 8009

relayers:
- name: osmos-cosmos-sonr
type: hermes
replicas: 1
chains:
- osmosis-1
- cosmoshub-4
- sonr-testnet-1

explorer:
enabled: true
ports:
rest: 3400

registry:
enabled: true
ports:
rest: 3401
7 changes: 5 additions & 2 deletions .github/deploy/devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"cargo@latest",
"uv@latest",
"bun@latest",
"yarn@latest",
"doppler@latest",
"go-task@latest"
],
Expand All @@ -13,12 +14,14 @@
"GITHUB_TOKEN": "$GITHUB_TOKEN",
"GOPATH": "$HOME/go",
"GOBIN": "$GOPATH/bin",
"GHQ_ROOT": "$CLONEDIR"
"GHQ_ROOT": "$CLONEDIR",
"PC_SOCK": "$HOME/.local/share/pc/sock"
},
"shell": {
"init_hook": [],
"scripts": {
"sonrd": ["sh ./scripts/start_sonrd.sh"]
"up": ["yarn starship start --config config.yaml"],
"down": ["yarn starship stop --config config.yaml"]
}
}
}
14 changes: 0 additions & 14 deletions .github/deploy/process-compose.yaml

This file was deleted.

File renamed without changes.
5 changes: 0 additions & 5 deletions .github/deploy/scripts/start_ipfs.sh

This file was deleted.

165 changes: 0 additions & 165 deletions .github/deploy/scripts/start_sonrd.sh

This file was deleted.

22 changes: 8 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,20 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& (file /code/build/sonrd | grep "statically linked")

# --------------------------------------------------------
FROM debian:11-slim
FROM alpine:3.17

LABEL org.opencontainers.image.source https://github.com/onsonr/sonr
LABEL org.opencontainers.image.title="sonr"
LABEL org.opencontainers.image.authors="diDAO <[email protected]>"
LABEL org.opencontainers.image.source=https://github.com/onsonr/sonr

COPY --from=go-builder /code/build/sonrd /usr/bin/sonrd

# Install dependencies for Debian 11
RUN apt-get update && apt-get install -y \
curl \
make \
bash \
jq \
sed \
&& rm -rf /var/lib/apt/lists/*
# Set up dependencies
ENV PACKAGES="curl make bash jq sed"

COPY scripts/test_node.sh /usr/bin/test_node.sh
# Install minimum necessary dependencies
RUN apk add --no-cache $PACKAGES

WORKDIR /opt

# rest server, tendermint p2p, tendermint rpc
EXPOSE 1317 26656 26657 6060

ENTRYPOINT ["/usr/bin/sonrd"]
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ else
go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd ./cmd/sonrd
endif

build-motr: go.sum
GOOS=js GOARCH=wasm go build -o static/wasm/app.wasm ./cmd/motr/main.go

build-hway: go.sum
go build -o build/hway ./cmd/hway

build-windows-client: go.sum
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd.exe ./cmd/sonrd

Expand Down Expand Up @@ -330,6 +324,12 @@ status:
@gum format -- "# Sonr ($OS-$VERSION)" "- ($(COMMIT)) $ROOT" "- $(RELEASE_DATE)"
@sleep 3

push-docker:
@docker build -t ghcr.io/onsonr/sonr:$(VERSION) .
@docker tag ghcr.io/onsonr/sonr:$(VERSION) ghcr.io/onsonr/sonr:latest
@docker push ghcr.io/onsonr/sonr:$(VERSION)
@docker push ghcr.io/onsonr/sonr:latest

release:
@go install github.com/goreleaser/goreleaser/v2@latest
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --clean
Expand Down

0 comments on commit a06bae6

Please sign in to comment.