From 7eac8e7a35ecf745540c97c43c47a4380d49992f Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Wed, 14 Feb 2024 19:29:41 +0100 Subject: [PATCH] Update Dockerbuild (#813) * v2.2.4 (#810) * feat: handle URLs with or without trailing slash (#803) * feat: handle URLs with or without trailing slash * tidy: cleanup slashes * Fix docker build (#805) * fix: fixed the docker build * tidy: cleanup * env: remove env contents (#808) * Portfolio fix (#809) * fix: fixed the portfolio account detail page layout * fix: fixed portfolio cards * tidy: refactor * align buttons, perps row clickable (#807) * align buttons, perps row clickable * fix comments * update to v2.2.4 * fix borrowbutton logic, add vault deposit manage btn, fix icon size vault modal --------- Co-authored-by: Linkie Link --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> * Update Dockerfile * remove .env files * tidy: format --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com> --- .env | 0 .env.production | 13 ------------- Dockerfile | 10 ++++++++-- src/components/perps/BalancesTable/index.tsx | 17 ++++++++++------- 4 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 .env delete mode 100644 .env.production diff --git a/.env b/.env deleted file mode 100644 index e69de29b..00000000 diff --git a/.env.production b/.env.production deleted file mode 100644 index 72ec85e3..00000000 --- a/.env.production +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT THIS FILE WHEN USING DOCKER -# These values are used to replace the values in the built app, -# you should pass environment variables as defined in README.md - -# NETWORK CONFIG # -NEXT_PUBLIC_NETWORK=mainnet - -# OSMOSIS-1 # -NEXT_PUBLIC_OSMOSIS_RPC=APP_NEXT_OSMOSIS_RPC -NEXT_PUBLIC_OSMOSIS_REST=APP_NEXT_OSMOSIS_REST - -# WALLET CONNECT # -NEXT_PUBLIC_WALLET_CONNECT_ID=APP_NEXT_WALLET_CONNECT_ID diff --git a/Dockerfile b/Dockerfile index f6aa2351..d9f1efc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,18 +6,24 @@ RUN yarn install COPY . . RUN apk --update add patch RUN patch next.config.js next-config.patch + +ENV NEXT_PUBLIC_NETWORK=mainnet +ENV NEXT_PUBLIC_OSMOSIS_RPC=APP_NEXT_OSMOSIS_RPC +ENV NEXT_PUBLIC_OSMOSIS_REST=APP_NEXT_OSMOSIS_REST +ENV NEXT_PUBLIC_WALLET_CONNECT_ID=APP_NEXT_WALLET_CONNECT_ID +ENV NODE_ENV=production + RUN yarn build FROM node:20-alpine as runner WORKDIR /app -ENV NODE_ENV=production + COPY --from=builder /app/package.json . COPY --from=builder /app/yarn.lock . COPY --from=builder /app/next.config.js . COPY --from=builder /app/public ./public COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static - COPY entrypoint.sh . RUN apk add --no-cache --upgrade bash diff --git a/src/components/perps/BalancesTable/index.tsx b/src/components/perps/BalancesTable/index.tsx index 94b7774b..d9b5bb45 100644 --- a/src/components/perps/BalancesTable/index.tsx +++ b/src/components/perps/BalancesTable/index.tsx @@ -12,13 +12,16 @@ export default function PerpsBalancesTable() { const columns = usePerpsBalancesColumns() const [searchParams, setSearchParams] = useSearchParams() - const onClickRow = useCallback((denom: string) => { - const params = getSearchParamsObject(searchParams) - setSearchParams({ - ...params, - [SearchParams.PERPS_MARKET]: denom, - }) - }, []) + const onClickRow = useCallback( + (denom: string) => { + const params = getSearchParamsObject(searchParams) + setSearchParams({ + ...params, + [SearchParams.PERPS_MARKET]: denom, + }) + }, + [searchParams, setSearchParams], + ) return (