docker学习仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
427 B

version: "3.9"
services:
# 当前目录是docker-compose.yml所在文件夹
backend:
build: ./backend # 第一个项目Dockerfile所在文件夹
ports:
- "5000:5000" # 本地端口和容器内端口的映射
volumes:
- ./backend:/app # 将backend目录和容器内的/app目录绑定
frontend:
build: ./frontend # 第二个项目Dockerfile所在文件夹
ports:
- "3000:3000"