Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix custom s3 for aws buckets + update docker template

Brendan Allan997b43b931e0
diff --git a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
index bf750ed04..f9e88e21f 100644
--- a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
+++ b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
@@ -1134,6 +1134,7 @@ export const ShareVideo = forwardRef<
<CommentIndicators
className="-mt-6 w-full md:-mt-6"
comments={comments}
+ longestDuration={longestDuration}
/>
</Suspense>
)}
@@ -1567,6 +1568,7 @@ const useTranscriptionProcessing = (
function CommentIndicators(props: {
className?: string;
comments: MaybePromise<CommentWithAuthor[]>;
+ longestDuration: number;
}) {
const comments =
props.comments instanceof Promise ? use(props.comments) : props.comments;
@@ -1577,7 +1579,7 @@ function CommentIndicators(props: {
const commentPosition =
comment.timestamp === null
? 0
- : (comment.timestamp / longestDuration) * 100;
+ : (comment.timestamp / props.longestDuration) * 100;
let tooltipContent = "";
if (comment.type === "text") {
diff --git a/apps/web/utils/s3.ts b/apps/web/utils/s3.ts
index e9a66c239..0f6777aa6 100644
--- a/apps/web/utils/s3.ts
+++ b/apps/web/utils/s3.ts
@@ -103,7 +103,9 @@ export async function getS3Config(config?: S3Config, internal = false) {
serverEnv().CAP_AWS_SECRET_KEY ??
"",
},
- forcePathStyle: config.forcePathStyle ?? true,
+ forcePathStyle: endpoint?.endsWith("s3.amazonaws.com")
+ ? false
+ : config.forcePathStyle ?? true,
useArnRegion: false,
requestHandler: {
connectionTimeout: isLocalOrMinio ? 5000 : 10000,
diff --git a/docker-compose.template.yml b/docker-compose.template.yml
index fbac33b4b..95b5cfef5 100644
--- a/docker-compose.template.yml
+++ b/docker-compose.template.yml
@@ -21,7 +21,8 @@ services:
CAP_AWS_SECRET_KEY: capS3root
CAP_AWS_BUCKET: capso
CAP_AWS_REGION: us-east-1
- CAP_AWS_ENDPOINT: http://minio:3902
+ S3_PUBLIC_ENDPOINT: http://localhost:3902
+ S3_INTERNAL_ENDPOINT: http://minio:3902
ports:
- 3000:3000