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

@@ -73,6 +73,7 @@ services:
S3_PRIVATE_BUCKET_NAME: ${S3_PRIVATE_BUCKET:-indeedhub-private}
S3_PUBLIC_BUCKET_NAME: ${S3_PUBLIC_BUCKET:-indeedhub-public}
S3_PUBLIC_BUCKET_URL: ${S3_PUBLIC_BUCKET_URL}
S3_PRIVATE_BUCKET_URL: ${S3_PRIVATE_BUCKET_URL:-}
# ── CloudFront (leave empty for MinIO/self-hosted) ──
CLOUDFRONT_PRIVATE_KEY: ${CLOUDFRONT_PRIVATE_KEY:-}
@@ -89,6 +90,9 @@ services:
# ── Nostr Auth / JWT ─────────────────────────────────
NOSTR_JWT_SECRET: ${NOSTR_JWT_SECRET}
NOSTR_JWT_EXPIRES_IN: ${NOSTR_JWT_EXPIRES_IN:-7d}
NOSTR_JWT_REFRESH_SECRET: ${NOSTR_JWT_REFRESH_SECRET:-}
NOSTR_JWT_TTL: ${NOSTR_JWT_TTL:-}
NOSTR_JWT_REFRESH_TTL: ${NOSTR_JWT_REFRESH_TTL:-}
# ── AES-128 Content Encryption ──────────────────────
AES_MASTER_SECRET: ${AES_MASTER_SECRET}
@@ -103,6 +107,7 @@ services:
# ── SendGrid (optional -- alternative to SMTP) ──────
SENDGRID_API_KEY: ${SENDGRID_API_KEY:-}
SENDGRID_SENDER: ${SENDGRID_SENDER:-}
SENDGRID_WAITLIST: ${SENDGRID_WAITLIST:-}
# ── Cognito (optional -- disabled with Nostr auth) ──
COGNITO_USER_POOL_ID: ${COGNITO_USER_POOL_ID:-}
@@ -140,6 +145,10 @@ services:
# ── Partner Content (optional) ──────────────────────
PARTNER_API_BASE_URL: ${PARTNER_API_BASE_URL:-}
PARTNER_API_KEY: ${PARTNER_API_KEY:-}
# ── Strike (optional -- alternative payment provider) ─
STRIKE_API_KEY: ${STRIKE_API_KEY:-}
STRIKE_WEBHOOK_KEY: ${STRIKE_WEBHOOK_KEY:-}
depends_on:
postgres:
condition: service_healthy