From 2beafc5a281a1774d73870937a3e2ac198319d72 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 21 Feb 2024 19:33:38 +0000 Subject: [PATCH] try prebuilt dockerfile --- Dockerfile | 15 +++++++++++++++ Dockerfile.render | 4 ++++ render.yaml | 8 ++++---- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 Dockerfile.render diff --git a/Dockerfile b/Dockerfile index 93cdb2dc35..31e8acc9eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,13 @@ RUN mkdir -p /etc/apt/keyrings && \ node --version && \ npm --version +# go +ENV PATH="${PATH}:/usr/local/go/bin" +RUN wget https://dl.google.com/go/go1.20.4.linux-amd64.tar.gz && \ + # -C to move to given directory + tar -C /usr/local/ -xzf go1.20.4.linux-amd64.tar.gz && \ + go version + # foundry ENV PATH="${PATH}:/root/.foundry/bin" RUN curl -L https://foundry.paradigm.xyz/ | bash && \ @@ -39,3 +46,11 @@ WORKDIR /app RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm run -r build + +FROM mud AS store-indexer +WORKDIR /app/packages/store-indexer +EXPOSE 3001 + +FROM mud AS faucet +WORKDIR /app/packages/faucet +EXPOSE 3002 diff --git a/Dockerfile.render b/Dockerfile.render new file mode 100644 index 0000000000..8ce6c67ec8 --- /dev/null +++ b/Dockerfile.render @@ -0,0 +1,4 @@ +FROM ghcr.io/latticexyz/mud:sha-8193136 + +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install +RUN pnpm run -r build diff --git a/render.yaml b/render.yaml index 7c37d3810f..6a823588af 100644 --- a/render.yaml +++ b/render.yaml @@ -4,7 +4,7 @@ services: plan: standard region: ohio runtime: docker - dockerfilePath: ./Dockerfile + dockerfilePath: ./Dockerfile.render dockerContext: ./packages/store-indexer dockerCommand: pnpm tsx bin/postgres-indexer envVars: @@ -21,7 +21,7 @@ services: plan: standard region: ohio runtime: docker - dockerfilePath: ./Dockerfile + dockerfilePath: ./Dockerfile.render dockerContext: ./packages/store-indexer dockerCommand: pnpm tsx bin/postgres-indexer envVars: @@ -41,7 +41,7 @@ services: runtime: docker domains: - base-mainnet-indexer.temp.offchain.dev - dockerfilePath: ./Dockerfile + dockerfilePath: ./Dockerfile.render dockerContext: ./packages/store-indexer dockerCommand: pnpm tsx bin/postgres-frontend envVars: @@ -58,7 +58,7 @@ services: runtime: docker domains: - redstone-holesky-indexer.temp.offchain.dev - dockerfilePath: ./Dockerfile + dockerfilePath: ./Dockerfile.render dockerContext: ./packages/store-indexer dockerCommand: pnpm tsx bin/postgres-frontend envVars: