学校订餐菜单生成器:Django+DRF 后端与 React 前端,支持 A/B 双套营养周菜单生成、部分自选、拼音搜索、营养校准、Excel 导出
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["sh", "-c", "\
|
||||
python manage.py migrate --noinput && \
|
||||
python manage.py seed_dishes && \
|
||||
python manage.py collectstatic --noinput && \
|
||||
python manage.py shell -c \"from django.contrib.auth import get_user_model; U=get_user_model(); U.objects.filter(username='admin').exists() or U.objects.create_superuser('admin','admin@example.com','admin123')\" && \
|
||||
gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 60"]
|
||||
Reference in New Issue
Block a user