Files
waiting-system/Dockerfile
Jun-dev f699a29a85 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>
2025-12-14 00:29:39 +09:00

36 lines
906 B
Docker

# 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"]