Enhance Docker and backend configurations for improved deployment
- Updated docker-compose.yml to include environment variable support for services, enhancing flexibility in configuration. - Refactored Dockerfile to utilize build arguments for VITE environment variables, allowing for better customization during builds. - Improved Nginx configuration to handle larger video uploads by increasing client_max_body_size to 5GB. - Enhanced backend Dockerfile to include wget for health checks and improved startup logging for database migrations. - Added validation for critical environment variables in the backend to ensure necessary configurations are present before application startup. - Updated content streaming logic to support direct HLS URL construction, improving streaming reliability and user experience. - Refactored various components and services to streamline access checks and improve error handling during content playback.
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -12,20 +12,20 @@ RUN npm ci
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Clear VITE_NOSTR_RELAYS so the app auto-detects the relay
|
||||
# via the /relay nginx proxy at runtime (instead of hardcoding localhost)
|
||||
ENV VITE_NOSTR_RELAYS=""
|
||||
# ── Build-time configuration via ARGs ────────────────────────
|
||||
# These are baked into the static JS bundle at build time.
|
||||
# Override them with docker-compose build.args or --build-arg.
|
||||
ARG VITE_NOSTR_RELAYS=""
|
||||
ARG VITE_USE_MOCK_DATA=false
|
||||
ARG VITE_CONTENT_ORIGIN=
|
||||
ARG VITE_INDEEHUB_API_URL=/api
|
||||
ARG VITE_INDEEHUB_CDN_URL=/storage
|
||||
|
||||
# Enable mock data mode as default — set to false to use the backend API
|
||||
ENV VITE_USE_MOCK_DATA=true
|
||||
|
||||
# Content origin must match the seeder's ORIGIN so that relay queries find
|
||||
# the seeded data, regardless of how users access the app in their browser
|
||||
ENV VITE_CONTENT_ORIGIN=http://localhost:7777
|
||||
|
||||
# IndeeHub self-hosted backend API (via nginx /api proxy)
|
||||
ENV VITE_INDEEHUB_API_URL=/api
|
||||
ENV VITE_INDEEHUB_CDN_URL=/storage
|
||||
ENV VITE_NOSTR_RELAYS=${VITE_NOSTR_RELAYS}
|
||||
ENV VITE_USE_MOCK_DATA=${VITE_USE_MOCK_DATA}
|
||||
ENV VITE_CONTENT_ORIGIN=${VITE_CONTENT_ORIGIN}
|
||||
ENV VITE_INDEEHUB_API_URL=${VITE_INDEEHUB_API_URL}
|
||||
ENV VITE_INDEEHUB_CDN_URL=${VITE_INDEEHUB_CDN_URL}
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
|
||||
Reference in New Issue
Block a user