修改docker-compose.dev

This commit is contained in:
xie7654
2025-07-04 13:12:32 +08:00
parent 562615cd1d
commit a5807e3fba
15 changed files with 127 additions and 65 deletions

View File

@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM python:3.12.2
FROM python:3.12.2 AS dev
WORKDIR /app
@@ -16,6 +16,7 @@ COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["sh", "-c", "sleep 10 && python manage.py runserver 0.0.0.0:8000"]
# 默认命令,开发和生产通过 docker-compose 覆盖
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
#CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

View File

@@ -1,4 +1,3 @@
from .celery import app as celery_app
__all__ = ('celery_app',)

View File

@@ -94,7 +94,8 @@ DATABASES = {
'NAME': 'django_vue',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost',
'HOST': os.getenv('DATABASE_HOST', 'localhost'),
# 'HOST': 'localhost',
}
}

View File

@@ -11,4 +11,4 @@ celery==5.5.3
redis==6.2.0
eventlet==0.40.0
goofish_api==0.0.6
flower==2.0.1
flower==2.0.1