Files
the-bible/Dockerfile
Ryderjj89 8236a25ae7 Made ESV directory structure consistent with NKJV
- **Docker ESV copy**: Changed from ESV → /app/bible-data to ESV → /app/ESV
- **Backend ESV path**: Updated ESV_DATA_DIR from '../../bible-data' to '../../ESV'
- **Consistent naming**: Both ESV and NKJV follow same /app/{VERSION}/ pattern
- **Clear mirroring**: Repository ESV/ folder → Container /app/ESV/
- **Improved clarity**: No more bible-data vs ESV directory mismatch

Both ESV and NKJV now follow identical directory conventions!
2025-09-28 18:26:05 -04:00

53 lines
1.1 KiB
Docker

# Multi-stage Dockerfile for production deployment
FROM node:18-alpine AS base
# Production stage
# Backend stage
FROM base AS backend
WORKDIR /app/backend
COPY backend/package*.json ./
RUN npm install --omit=dev
# Frontend build stage
FROM base AS frontend-build
WORKDIR /app/frontend
COPY frontend/package*.json ./
COPY frontend/tsconfig.json ./
COPY frontend/tailwind.config.js ./
COPY frontend/postcss.config.js ./
RUN npm install
COPY frontend/public ./public
COPY frontend/src ./src
RUN npm run build
# Production stage
FROM base AS production
WORKDIR /app
# Copy backend
COPY backend ./backend
COPY --from=backend /app/backend/node_modules ./backend/node_modules
# Copy logos folder for frontend
COPY frontend/logos ./frontend/logos
# Copy built frontend
COPY --from=frontend-build /app/frontend/build ./frontend/build
# Copy docker-compose configuration
COPY docker-compose.yml ./
# Copy ESV Bible data from repository
COPY ESV /app/ESV
# Copy NKJV Bible data from repository
COPY NKJV /app/NKJV
# Expose port
EXPOSE 3000
# Start backend server
WORKDIR /app/backend
CMD ["npm", "start"]