fix: revert to market_page style, collectstatic in startup command
All checks were successful
Deploy to Server / deploy (push) Successful in 1m46s
All checks were successful
Deploy to Server / deploy (push) Successful in 1m46s
This commit is contained in:
@@ -16,9 +16,6 @@ RUN pip install --upgrade pip && pip install -r requirements.txt
|
|||||||
COPY . /app/
|
COPY . /app/
|
||||||
COPY .env /app/
|
COPY .env /app/
|
||||||
|
|
||||||
# 收集静态文件(build 时执行,避免每次启动都跑)
|
|
||||||
RUN python manage.py collectstatic --noinput || true
|
|
||||||
|
|
||||||
# 暴露端口
|
# 暴露端口
|
||||||
EXPOSE 8876
|
EXPOSE 8876
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ services:
|
|||||||
backend:
|
backend:
|
||||||
build: ./backend
|
build: ./backend
|
||||||
container_name: cywl-scoring-backend
|
container_name: cywl-scoring-backend
|
||||||
command: sh -c "python manage.py migrate && gunicorn --bind 0.0.0.0:8876 --workers 4 --timeout 120 --access-logfile - --error-logfile - config.wsgi:application"
|
command: sh -c "python manage.py collectstatic --noinput && python manage.py migrate && gunicorn --bind 0.0.0.0:8876 --workers 4 --timeout 120 --access-logfile - --error-logfile - config.wsgi:application"
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./backend:/app
|
||||||
- ./backend/media:/app/media
|
- ./backend/media:/app/media
|
||||||
- ./backend/.env:/app/.env
|
|
||||||
ports:
|
ports:
|
||||||
- "8876:8876"
|
- "8876:8876"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user