diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0eb547277..627c19bd1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -141,6 +141,7 @@ jobs: - packages/crons - packages/geocoder-service - packages/recent-helium-transactions-service + - packages/blockchain-api steps: - uses: actions/checkout@v3 - uses: ./.github/actions/build-anchor/ diff --git a/packages/blockchain-api/Dockerfile b/packages/blockchain-api/Dockerfile index d6144e33e..b7e1f5ca7 100644 --- a/packages/blockchain-api/Dockerfile +++ b/packages/blockchain-api/Dockerfile @@ -31,9 +31,7 @@ ARG SENTRY_ORG ARG SENTRY_PROJECT ARG SENTRY_RELEASE -# Skip server env validation at build time — real values injected at runtime -ENV SKIP_ENV_VALIDATION=1 \ - NEXT_PUBLIC_PRIVY_APP_ID="__NEXT_PUBLIC_PRIVY_APP_ID__" \ +ENV NEXT_PUBLIC_PRIVY_APP_ID="__NEXT_PUBLIC_PRIVY_APP_ID__" \ NEXT_PUBLIC_SOLANA_CLUSTER="__NEXT_PUBLIC_SOLANA_CLUSTER__" \ NEXT_PUBLIC_SOLANA_URL="__NEXT_PUBLIC_SOLANA_URL__" \ NEXT_PUBLIC_WORLD_HELIUM_URL="__NEXT_PUBLIC_WORLD_HELIUM_URL__" \ @@ -46,7 +44,17 @@ ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN} \ SENTRY_PROJECT=${SENTRY_PROJECT} \ SENTRY_RELEASE=${SENTRY_RELEASE} -RUN pnpm turbo run build --filter=@helium/blockchain-api-service +RUN printf '%s\n' \ + 'SKIP_ENV_VALIDATION=1' \ + 'PG_USER=build' \ + 'PG_NAME=build' \ + 'PG_HOST=localhost' \ + 'PG_PORT=5432' \ + 'PRIVY_APP_SECRET=build' \ + 'BRIDGE_API_KEY=build' \ + 'JUPITER_API_KEY=build' \ + > packages/blockchain-api/.env && \ + pnpm turbo run build --filter=@helium/blockchain-api-service # Production image, copy all the files and run next FROM node:22-alpine diff --git a/packages/blockchain-api/src/app/api/v1/[[...rest]]/route.ts b/packages/blockchain-api/src/app/api/v1/[[...rest]]/route.ts index bf0f3714c..fce164be1 100644 --- a/packages/blockchain-api/src/app/api/v1/[[...rest]]/route.ts +++ b/packages/blockchain-api/src/app/api/v1/[[...rest]]/route.ts @@ -7,6 +7,8 @@ import { onError } from "@orpc/server"; import { ORPCError } from "@orpc/server"; import * as Sentry from "@sentry/nextjs"; +export const dynamic = "force-dynamic"; + /** * ORPC OpenAPI handler for the public v1 API. * diff --git a/packages/blockchain-api/src/app/layout.tsx b/packages/blockchain-api/src/app/layout.tsx index bb0cd13e7..5694f0515 100644 --- a/packages/blockchain-api/src/app/layout.tsx +++ b/packages/blockchain-api/src/app/layout.tsx @@ -4,7 +4,6 @@ import { Geist, Geist_Mono } from "next/font/google"; import React, { Suspense } from "react"; import { Toaster } from "@/components/ui/sonner"; import "./globals.css"; -import "../lib/background-jobs/transaction-resubmission"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -31,14 +30,14 @@ export default function RootLayout({ />