docker-compose.yml 549 B

1234567891011121314151617
  1. version: '3.8'
  2. services:
  3. next-web-ui:
  4. container_name: next-web-ui
  5. build:
  6. context: .
  7. dockerfile: Dockerfile
  8. restart: always
  9. ports:
  10. # 格式: "宿主机IP:宿主机端口:容器端口"
  11. # 将容器的 3000 映射到宿主机的 3000,且仅限本机访问
  12. - "127.0.0.1:3000:3000"
  13. environment:
  14. - NEXT_DISABLE_ESLINT=1
  15. - NODE_ENV=production
  16. # 如果需要连接同在宿主机上的后端(非Docker),可以使用 host.docker.internal (需配置) 或直接填公网/局域网IP