创赢未来评分系统 - 初始化提交(移除大文件)
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
This commit is contained in:
31
docker-compose.yml
Normal file
31
docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
services:
|
||||
backend:
|
||||
build: ./backend
|
||||
# 使用 gunicorn 替代 runserver,提高稳定性,并捕获标准输出1
|
||||
command: sh -c "python manage.py collectstatic --noinput && python manage.py migrate && gunicorn --bind 0.0.0.0:8000 --access-logfile - --error-logfile - config.wsgi:application"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./backend/media:/app/media
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- DB_NAME=market
|
||||
- DB_USER=market
|
||||
- DB_PASSWORD=123market
|
||||
- DB_HOST=6.6.6.66
|
||||
- DB_PORT=5432
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
args:
|
||||
- VITE_API_URL=/api
|
||||
# volumes:
|
||||
# - ./frontend:/app
|
||||
# - /app/node_modules
|
||||
ports:
|
||||
- "15173:15173"
|
||||
environment:
|
||||
- VITE_API_URL=http://localhost:8000/api
|
||||
depends_on:
|
||||
- backend
|
||||
Reference in New Issue
Block a user