Skip to content

Conversation

@lmarini
Copy link
Collaborator

@lmarini lmarini commented Dec 3, 2025

This fixes the S3 self signed URLs when running all containers in docker compose for self hosted.

Before the URLs were being signed with the internal docker service name minio and then they would failed when being validated against localhost. Now we can provide a MINIO_PUBLIC_ENDPOINT in cases where the internal and external urls are different.

I am honestly not sure if this is the best strategy, but it seems to work locally. Not tested on dev yet and it could use some more testing on localhost using the current dev environment where MINIO_PUBLIC_ENDPOINT should not be necessary.

…d when all containers are running in docker and we are using internal docker service names.
…docker network.

Added console logs for s3 configs to make it easier to debug.
@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
uiuc-chat-frontend Ready Ready Preview Comment Dec 3, 2025 6:08pm

Copy link
Collaborator

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the best way to test this PR? Should I build this branch locally into an image? I recall the self-hosted setup is linked via git submodules just wonder if there's any tricks.

console.log('[s3Client] AWS_SECRET:', process.env.AWS_SECRET ? '***' + '*'.repeat(Math.min(process.env.AWS_SECRET.length - 4, 8)) + process.env.AWS_SECRET.slice(-4) : 'undefined')
console.log('[s3Client] LOCAL_MINIO:', process.env.LOCAL_MINIO)
console.log('[s3Client] MINIO_ENDPOINT:', process.env.MINIO_ENDPOINT)
console.log('[vyriadMinioClient] S3_BUCKET_NAME:', process.env.S3_BUCKET_NAME)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove those logs that prints out secret?

console.log('[vyriadMinioClient] MINIO_ENDPOINT:', process.env.MINIO_ENDPOINT)
console.log('[vyriadMinioClient] MINIO_REGION:', process.env.MINIO_REGION)
console.log('[vyriadMinioClient] S3_BUCKET_NAME:', process.env.S3_BUCKET_NAME)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same should we remove those console logs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left that there because they might be useful for debugging, but when I last was paying attention to the logs I think some of them show up multiple times (instead of just at startup). If they just show up at startup it might behelpful to leave them there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants