从 Laravel 版本 8 升级到 9 时,我是 vite js 的新手。我正在使用 vite js 为 Laravel 9 项目构建 docker。有一个问题:我无法从 Docker 容器中公开资源主机。它仍然在 docker 容器内部工作。有什么建议吗?谢谢。
这是我的 docker-compose 文件
version: "3.9"
services:
nginx:
image: nginx:1.23-alpine
ports:
- 80:80
mem_limit: "512M"
volumes:
- type: bind
source: ./api
target: /usr/share/nginx/html/api
- type: bind
source: ./docker/nginx/dev/default.conf
target: /etc/nginx/conf.d/default.conf
php:
platform: linux/amd64
build:
context: .
dockerfile: ./docker/php/dev/Dockerfile
mem_limit: "512M"
volumes:
- type: bind
source: ./api
target: /usr/share/nginx/html/api
oracle:
platform: linux/amd64
image: container-registry.oracle.com/database/express:21.3.0-xe
ports:
- 1521:1521
# - 5500:5500
volumes: …Run Code Online (Sandbox Code Playgroud)