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