-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from desci-labs/develop
promote main dpid resolver
- Loading branch information
Showing
42 changed files
with
23,473 additions
and
6,960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
.git | ||
.gitignore | ||
.husky | ||
.env | ||
.github/ | ||
.vscode/ | ||
dist/ | ||
node_modules/ | ||
test/ | ||
kubernetes/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
PORT=5460 | ||
SUPABASE_URL= | ||
SUPABASE_KEY= | ||
DPID_ENV=dev | ||
|
||
# Set these to run with a local redis instance, outside of the backend cluster | ||
# REDIS_HOST=localhost | ||
# REDIS_PORT=6379 | ||
# Short TTL's for tinkering with history loading | ||
# CACHE_TTL_ANCHORED=60 | ||
# CACHE_TTL_PENDING=10 | ||
|
||
# If set to 1, the `/*` route will use the legacy handler | ||
FALLBACK_RESOLVER=0 | ||
|
||
# Local | ||
# DPID_ENV=local # TODO, app prob doesn't like this yet | ||
# OPTIMISM_RPC_URL=http://localhost:8545 | ||
# CERAMIC_URL=https://localhost:7007 | ||
# IPFS_GATEWAY=http://localhost:8089/ipfs | ||
|
||
# Dev & staging | ||
DPID_ENV=dev | ||
OPTIMISM_RPC_URL=https://reverse-proxy-dev.desci.com/rpc_opt_sepolia | ||
CERAMIC_URL=https://ceramic-dev.desci.com | ||
IPFS_GATEWAY=https://ipfs.desci.com/ipfs | ||
|
||
# Staging | ||
# DPID_ENV=staging | ||
# OPTIMISM_RPC_URL=https://reverse-proxy-staging.desci.com/rpc_opt_sepolia | ||
# CERAMIC_URL=https://ceramic-prod.desci.com | ||
# IPFS_GATEWAY=https://ipfs.desci.com/ipfs | ||
|
||
# Prod | ||
# DPID_ENV=production | ||
# OPTIMISM_RPC_URL=https://reverse-proxy-prod.desci.com/rpc_opt_sepolia | ||
# CERAMIC_URL=https://ceramic-prod.desci.com | ||
# IPFS_GATEWAY=https://ipfs.desci.com/ipfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Tests run code generating destination URLs using these variables, which | ||
# would work locally too, but the code actually resolving manifest components | ||
# or drive files does not as they rely on content of dpid 46 being pinned | ||
|
||
DPID_ENV=dev | ||
IPFS_GATEWAY=https://ipfs.desci.com/ipfs | ||
OPTIMISM_RPC_URL=https://reverse-proxy-dev.desci.com/rpc_opt_sepolia | ||
CERAMIC_URL=https://ceramic-dev.desci.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: | ||
pull_request | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
check-latest: false | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bash sanityCheckEnv.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18 | ||
20.13.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
FROM node:16.17.0 | ||
ARG NODE_VERSION | ||
FROM node:${NODE_VERSION}-alpine3.20 AS base | ||
RUN apk update && apk add --no-cache bash dumb-init | ||
|
||
WORKDIR /usr/src/app | ||
COPY . ./ | ||
RUN npm install -g npm@9.5.1 | ||
RUN npm ci --ignore-scripts | ||
EXPOSE 5460 | ||
COPY .env.example .env | ||
COPY package*.json ./ | ||
|
||
FROM base AS builder | ||
|
||
RUN --mount=type=cache,target=/usr/src/app/.npm \ | ||
npm set cache /usr/src/app/.npm && \ | ||
npm ci | ||
COPY . . | ||
RUN npm run build | ||
RUN apt-get install -y bash | ||
CMD [ "npm", "run", "start" ] | ||
|
||
FROM base AS prod | ||
|
||
COPY --chown=node:node --from=builder /usr/src/app/dist dist/ | ||
COPY --chown=node:node --from=builder /usr/src/app/node_modules node_modules/ | ||
COPY --chown=node:node --from=builder /usr/src/app/.env.example .env | ||
|
||
USER node | ||
EXPOSE 5460 | ||
|
||
CMD [ "dumb-init", "node", "--no-warnings=ExperimentalWarning", "dist/index.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.