dev-nginx.yml 414 B

123456789101112131415
  1. # 本地开发 nginx 配置
  2. # 用法: docker compose -f docker-nginx/dev-nginx.yml up -d
  3. # 前提: hosts 文件已添加 127.0.0.1 book.rrbrr.com
  4. services:
  5. nginx:
  6. image: nginx:latest
  7. container_name: nginx-local-dev
  8. ports:
  9. - "80:80"
  10. volumes:
  11. - ./dev-nginx.conf:/etc/nginx/conf.d/default.conf:ro
  12. extra_hosts:
  13. - "host.docker.internal:host-gateway"
  14. restart: unless-stopped