Skip to content

Commit 997b43b

Browse files
committed
fix custom s3 for aws buckets + update docker template
1 parent 0ebdda6 commit 997b43b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

apps/web/app/s/[videoId]/_components/ShareVideo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,7 @@ export const ShareVideo = forwardRef<
11341134
<CommentIndicators
11351135
className="-mt-6 w-full md:-mt-6"
11361136
comments={comments}
1137+
longestDuration={longestDuration}
11371138
/>
11381139
</Suspense>
11391140
)}
@@ -1567,6 +1568,7 @@ const useTranscriptionProcessing = (
15671568
function CommentIndicators(props: {
15681569
className?: string;
15691570
comments: MaybePromise<CommentWithAuthor[]>;
1571+
longestDuration: number;
15701572
}) {
15711573
const comments =
15721574
props.comments instanceof Promise ? use(props.comments) : props.comments;
@@ -1577,7 +1579,7 @@ function CommentIndicators(props: {
15771579
const commentPosition =
15781580
comment.timestamp === null
15791581
? 0
1580-
: (comment.timestamp / longestDuration) * 100;
1582+
: (comment.timestamp / props.longestDuration) * 100;
15811583

15821584
let tooltipContent = "";
15831585
if (comment.type === "text") {

apps/web/utils/s3.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export async function getS3Config(config?: S3Config, internal = false) {
103103
serverEnv().CAP_AWS_SECRET_KEY ??
104104
"",
105105
},
106-
forcePathStyle: config.forcePathStyle ?? true,
106+
forcePathStyle: endpoint?.endsWith("s3.amazonaws.com")
107+
? false
108+
: config.forcePathStyle ?? true,
107109
useArnRegion: false,
108110
requestHandler: {
109111
connectionTimeout: isLocalOrMinio ? 5000 : 10000,

docker-compose.template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ services:
2121
CAP_AWS_SECRET_KEY: capS3root
2222
CAP_AWS_BUCKET: capso
2323
CAP_AWS_REGION: us-east-1
24-
CAP_AWS_ENDPOINT: http://minio:3902
24+
S3_PUBLIC_ENDPOINT: http://localhost:3902
25+
S3_INTERNAL_ENDPOINT: http://minio:3902
2526
ports:
2627
- 3000:3000
2728

0 commit comments

Comments
 (0)