update docker dev.yml

This commit is contained in:
XIE7654
2025-07-13 21:42:25 +08:00
parent f5314efc81
commit badba2662f
5 changed files with 55 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ COPY . .
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
# 入口命令由 docker-compose 控制
# 数据库迁移
RUN python manage.py makemigrations && python manage.py migrate
#RUN python manage.py makemigrations && python manage.py migrate
# 收集静态文件
RUN python manage.py collectstatic --noinput
@@ -26,7 +26,9 @@ RUN python manage.py collectstatic --noinput
FROM base AS dev
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
#CMD ["tail", "-f", "/dev/null"]
#CMD ["daphne", "backend.asgi:application"]
# CMD ["sh", "-c", "sleep 5 && python manage.py runserver 0.0.0.0:8000"]