Files
market_page/docker-compose.yml
jeremygan2021 fd33201793
All checks were successful
Deploy to Server / deploy (push) Successful in 37s
移动端
2026-02-24 16:09:07 +08:00

31 lines
801 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
backend:
build: ./backend
# 使用 gunicorn 替代 runserver提高稳定性并捕获标准输出
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
ports:
- "8000:8000"
environment:
- DB_NAME=market
- DB_USER=market
- DB_PASSWORD=123market
- DB_HOST=localhost
- 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