Add waiting system application files
- Add main application files (main.py, models.py, schemas.py, etc.) - Add routers for all features (waiting, attendance, members, etc.) - Add HTML templates for admin and user interfaces - Add migration scripts and utility files - Add Docker configuration - Add documentation files - Add .gitignore to exclude database and cache files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
# Dockerfile
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies for build (if needed for some packages)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install dependencies + Production extras
|
||||
RUN pip install --no-cache-dir -r requirements.txt && \
|
||||
pip install --no-cache-dir psycopg2-binary gunicorn redis
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Create entrypoint script
|
||||
RUN echo '#!/bin/bash\n\
|
||||
# Wait for DB to be ready (simple sleep or use wait-for-it)\n\
|
||||
sleep 5\n\
|
||||
\n\
|
||||
# Run migrations (assuming migrate_db.py or similar exists, or albuvicorn startup handles it)\n\
|
||||
# python migrate_db.py\n\
|
||||
\n\
|
||||
# Start Gunicorn\n\
|
||||
exec gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000\n\
|
||||
' > /app/entrypoint.sh && chmod +x /app/entrypoint.sh
|
||||
|
||||
CMD ["/app/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user