Files
indee-demo/Dockerfile
Dorian cdd24a5def Implement backend API and database services in Docker setup
- Added a new `api` service for the NestJS backend, including health checks and dependencies on PostgreSQL, Redis, and MinIO.
- Introduced PostgreSQL and Redis services with health checks and configurations for data persistence.
- Added MinIO for S3-compatible object storage and a one-shot service to initialize required buckets.
- Updated the Nginx configuration to proxy requests to the new backend API and MinIO storage.
- Enhanced the Dockerfile to support the new API environment variables and configurations.
- Updated the `package.json` and `package-lock.json` to include new dependencies for QR code generation and other utilities.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 20:14:39 +00:00

50 lines
1.1 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 . .
# 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=""
# 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
# 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;"]