Compare commits
36 الالتزامات
| المؤلف | SHA1 | التاريخ | |
|---|---|---|---|
| 095e368422 | |||
| bbb19de76b | |||
| 32a223b286 | |||
| ca599525a8 | |||
| 4f0f61817e | |||
| aeab1f5637 | |||
| d816df1805 | |||
| d1f8462070 | |||
| 4c334542fb | |||
| 7f3281f19e | |||
| 1a57661a9a | |||
| 4ce62a08b3 | |||
| 370a90bb23 | |||
| b268583420 | |||
| 5993f1aceb | |||
| ae0c77babc | |||
| 49a18aa156 | |||
| cf7d9b257d | |||
| 0f77ebb98c | |||
| 313743268c | |||
| 9d60f0f509 | |||
| 7c7f7bc112 | |||
| f3d6e2d92e | |||
| ab1ba55fd0 | |||
| 3ebc77b07d | |||
| 773730ae61 | |||
| 594ef963ad | |||
| 6b3be4457e | |||
| 90d7458cfb | |||
| 8f446aaac2 | |||
| 74aabc599a | |||
| 73bbdedaa0 | |||
| 855a7b6b93 | |||
| 0a9be9f312 | |||
| c2edf01ef5 | |||
| 7ace0910bd |
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
# Build stage for React frontend
|
||||
FROM node:18-alpine AS frontend-build
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm install
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Production stage for Python backend
|
||||
FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies for database clients
|
||||
RUN apt-get update && apt-get install -y \
|
||||
default-mysql-client \
|
||||
postgresql-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy built frontend
|
||||
COPY --from=frontend-build /app/dist ./dist
|
||||
|
||||
# Copy backend
|
||||
COPY backend/ ./backend/
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r backend/requirements.txt gunicorn
|
||||
|
||||
# Environment variables
|
||||
ENV FLASK_APP=backend/app.py
|
||||
ENV PORT=8000
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Run with gunicorn
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "backend.app:app"]
|
||||
المرجع في مشكلة جديدة
حظر مستخدم