-
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 remote-tracking branch 'origin/main' into ui-cicd
- Loading branch information
Showing
11 changed files
with
175 additions
and
32 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
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,22 @@ | ||
# Dockerfile used by the pitchlake-launcher | ||
|
||
# Use Node.js v20 as the base image | ||
FROM node:20-alpine AS builder | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Install pnpm | ||
RUN npm install -g pnpm | ||
|
||
# Copy package files first | ||
COPY package.json pnpm-lock.yaml* ./ | ||
|
||
# Install dependencies | ||
RUN pnpm install --frozen-lockfile | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
# Define the command to run the app | ||
CMD ["pnpm", "run", "build", "&&", "pnpm", "start", "-p", "${PORT}"] |
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,5 @@ | ||
import { NextResponse } from 'next/server'; | ||
|
||
export async function GET() { | ||
return new NextResponse("healthy", { status: 200 }); | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// "use server"; | ||
// | ||
// import { useEffect, useCallback, useState } from "react"; | ||
// import { createJobId } from "@/lib/utils"; | ||
// | ||
// // Poll a job's status using it's ID | ||
// const INTERVAL_MS = 3000; | ||
// | ||
// interface StatusData { | ||
// status?: string; | ||
// error?: string; | ||
// } | ||
// | ||
// const useFossilStatus = ( | ||
// targetTimestamp: string | undefined, | ||
// roundId: string | undefined, | ||
// ) => { | ||
// const [status, setStatus] = useState<StatusData | null>(null); | ||
// const [error, setError] = useState<string | null>(null); | ||
// const [loading, setLoading] = useState<boolean>(false); | ||
// | ||
// const fetchStatus = useCallback(async () => { | ||
// if (!targetTimestamp || targetTimestamp === "0") return; | ||
// if (!roundId || roundId === "0") return; | ||
// setLoading(true); | ||
// try { | ||
// const jobId = createJobId(targetTimestamp); | ||
// const response = await fetch( | ||
// `${process.env.FOSSIL_API_URL}/job_status/${jobId}`, | ||
// ); | ||
// if (!response.ok) throw new Error("Network response was not ok"); | ||
// | ||
// const data = await response.json(); | ||
// setStatus(data); | ||
// setError(null); | ||
// } catch (err) { | ||
// setStatus(null); | ||
// setError("Error fetching job status"); | ||
// } finally { | ||
// setLoading(false); | ||
// } | ||
// }, [targetTimestamp]); | ||
// | ||
// useEffect(() => { | ||
// if ( | ||
// !targetTimestamp || | ||
// targetTimestamp === "0" || | ||
// !roundId || | ||
// roundId === "0" || | ||
// status?.status === "Completed" || | ||
// status?.status === "Failed" | ||
// ) | ||
// return; | ||
// | ||
// const intervalId = setInterval(fetchStatus, INTERVAL_MS); | ||
// fetchStatus(); | ||
// | ||
// return () => { | ||
// clearInterval(intervalId); | ||
// }; | ||
// }, [targetTimestamp, fetchStatus]); | ||
// | ||
// return { status, error, loading }; | ||
// }; | ||
// | ||
// export default useFossilStatus; |