Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gsw 386 gno docker #8

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/public-for-swap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

name: Public gno for swap
on:
push:
branches: [ "gs/base_clean" ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
gnoland:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set env
run: |
echo "GITSHA=${GITHUB_SHA::8}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
target: gnoland-slim
push: true
tags: |
gnoswap/gnoland:latest
gnoswap/gnoland:${{ env.GITSHA }}

gnokey:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set env
run: |
echo "GITSHA=${GITHUB_SHA::8}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
target: gnokey-slim
push: true
tags: |
gnoswap/gnokey:latest
gnoswap/gnokey:${{ env.GITSHA }}
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ RUN apt-get update && apt-get install -y expect ca-certificates && updat
FROM runtime-base AS gnoland-slim
WORKDIR /opt/gno/src/gno.land/
COPY --from=build /opt/build/build/gnoland /opt/gno/bin/
ENTRYPOINT ["gnoland"]
EXPOSE 26657 36657
COPY --from=build /opt/build/gno.land/genesis /opt/gno/src/gno.land/genesis
COPY --from=build /opt/build/examples /opt/gno/src/examples
COPY --from=build /opt/build/gnovm/stdlibs /opt/gno/src/gnovm/stdlibs
COPY --from=build /opt/build/gnovm/pkg /opt/gno/src/gnovm/pkg
EXPOSE 26657

FROM runtime-base AS gnokey-slim
COPY --from=build /opt/build/build/gnokey /opt/gno/bin/
ENTRYPOINT ["gnokey"]

FROM runtime-base AS gno-slim
COPY --from=build /opt/build/build/gno /opt/gno/bin/
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func DefaultBaseConfig() BaseConfig {
PrivValidatorState: defaultPrivValStatePath,
NodeKey: defaultNodeKeyPath,
Moniker: defaultMoniker,
ProxyApp: "tcp://127.0.0.1:26658",
ProxyApp: "tcp://0.0.0.0:26658",
ABCI: "socket",
LogLevel: DefaultPackageLogLevels(),
LogFormat: LogFormatPlain,
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/rpc/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type RPCConfig struct {
// DefaultRPCConfig returns a default configuration for the RPC server
func DefaultRPCConfig() *RPCConfig {
return &RPCConfig{
ListenAddress: "tcp://127.0.0.1:26657",
ListenAddress: "tcp://0.0.0.0:26657",
CORSAllowedOrigins: []string{"*"},
CORSAllowedMethods: []string{http.MethodHead, http.MethodGet, http.MethodPost, http.MethodOptions},
CORSAllowedHeaders: []string{"Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time"},
Expand Down