Files
the-bible/Dockerfile
Ryderjj89 8dcf1ed1fa Updated Docker to use local ESV copy instead of external mdbible clone
- **ESV data source**: Switched from external mdbible GitHub repo to local ESV directory
- **Removed git clone**: No longer cloning from https://github.com/lguenth/mdbible.git
- **Local ESV copy**: Now COPY ESV /app/bible-data instead of external pull
- **Removed git dependency**: Cleaned up unnecessary git install in Dockerfile
- **Updated comments**: Backend now correctly marked ESV as 'local files'

Both ESV and NKJV now served from local repository files in Docker container!
2025-09-28 18:24:36 -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/bible-data
# Copy NKJV Bible data from repository
COPY NKJV /app/NKJV
# Expose port
EXPOSE 3000
# Start backend server
WORKDIR /app/backend
CMD ["npm", "start"]