Files
indee-demo/Dockerfile
Dorian 3ca43b62e4 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.
2026-02-13 12:35:03 +00:00

50 lines
1.2 KiB
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# ── 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
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
# Production stage
FROM nginx:alpine
# Install curl for health checks
RUN apk add --no-cache curl
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Copy built assets from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
# Expose port 7777
EXPOSE 7777
# Start nginx
CMD ["nginx", "-g", "daemon off;"]