Skip to content

Commit

Permalink
tilt: fix accounting deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray authored and justinschuldt committed Jan 30, 2023
1 parent ab6146f commit ae82c40
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 128 deletions.
7 changes: 7 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,13 @@ if wormchain:
ignore = ["./wormchain/testing", "./wormchain/ts-sdk", "./wormchain/design", "./wormchain/vue", "./wormchain/build/wormchaind"],
)

docker_build(
ref = "vue-export",
context = ".",
dockerfile = "./wormchain/Dockerfile.proto",
target = "vue-export",
)

def build_wormchain_yaml(yaml_path, num_instances):
wormchain_yaml = read_yaml_stream(yaml_path)

Expand Down
35 changes: 35 additions & 0 deletions wormchain/Dockerfile.deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is a multi-stage docker file:
# 1. The first stage contains the built contracts (wasm files)
# 2. The second creates a node.js environment to deploy the contracts to devnet

# local cosmwasm image, built by tilt
FROM cosmwasm_artifacts AS artifacts

# Contract deployment stage
FROM node:16-buster-slim@sha256:93c9fc3550f5f7d159f282027228e90e3a7f8bf38544758024f005e82607f546

# Support additional root CAs
COPY cert.pem* /certs/
# Node
ENV NODE_EXTRA_CA_CERTS=/certs/cert.pem
ENV NODE_OPTIONS=--use-openssl-ca
# npm
RUN if [ -e /certs/cert.pem ]; then npm config set cafile /certs/cert.pem; fi

RUN apt update && apt install netcat curl jq -y

WORKDIR /app/tools

COPY --from=artifacts / /app/artifacts

COPY ./ts-sdk/package.json ./ts-sdk/package-lock.json /ts-sdk/
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci --prefix=/ts-sdk
COPY ./ts-sdk /ts-sdk
COPY --from=vue-export /vue /vue
RUN npm run build --prefix=/ts-sdk

COPY ./contracts/tools/package.json ./contracts/tools/package-lock.json /app/tools/
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci
COPY ./contracts/tools /app/tools
Loading

0 comments on commit ae82c40

Please sign in to comment.