Update environment variables and enhance Docker configurations for improved deployment

- Modified .env.portainer to include new environment variables for S3 private bucket URL, Nostr JWT secrets, and SendGrid options.
- Updated docker-compose.yml to support the new environment variables, enhancing service configurations.
- Added a seed content script to the backend package.json for initializing the database with sample data.
- Refactored helper functions to construct S3 URLs more robustly, accommodating potential missing configurations.
- Enhanced dev.sh script to seed the database if empty, ensuring content availability during development.
This commit is contained in:
Dorian
2026-02-13 16:27:51 +00:00
parent 3ca43b62e4
commit a8dc82dc59
4 changed files with 23 additions and 2 deletions

View File

@@ -22,7 +22,10 @@ export function getPublicS3Url(fileKey: string): string {
}
export function getPrivateS3Url(fileKey: string): string {
return `${process.env.S3_PRIVATE_BUCKET_URL}${encodeS3KeyForUrl(fileKey)}`;
const base =
process.env.S3_PRIVATE_BUCKET_URL ||
`${process.env.S3_ENDPOINT || 'http://localhost:9000'}/${process.env.S3_PRIVATE_BUCKET_NAME || 'indeedhub-private'}/`;
return `${base}${encodeS3KeyForUrl(fileKey)}`;
}
export function getTranscodedFileRoute(fileKey: string): string {