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

@@ -26,7 +26,8 @@
"typeorm:create-migration": "npm run typeorm -- migration:create src/database/migrations/$npm_config_name",
"typeorm:generate-migration": "npm run typeorm -- -d src/database/ormconfig.ts migration:generate src/database/migrations/$npm_config_name",
"typeorm:revert-migration": "npm run typeorm -- -d src/database/ormconfig.ts migration:revert",
"typeorm:run-migrations": "npm run typeorm migration:run -- -d src/database/ormconfig.ts"
"typeorm:run-migrations": "npm run typeorm migration:run -- -d src/database/ormconfig.ts",
"seed:content": "ts-node src/scripts/seed-content.ts"
},
"config": {
"commitizen": {

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 {