24 lines
681 B
YAML
24 lines
681 B
YAML
version: "1.0"
|
||
|
||
services:
|
||
drive-server:
|
||
# nestjs服务
|
||
container_name: drive-server
|
||
build:
|
||
# 根据Dockerfile构建镜像
|
||
context: .
|
||
dockerfile: Dockerfile
|
||
ports:
|
||
- 7666:7666
|
||
restart: on-failure # 设置自动重启,这一步必须设置,主要是存在mysql还没有启动完成就启动了node服务
|
||
volumes:
|
||
- ./prod.yaml:/prod:yaml
|
||
# networks:
|
||
# - drive-server
|
||
|
||
# 声明一下网桥 my-server。
|
||
# 重要:将所有服务都挂载在同一网桥即可通过容器名来互相通信了
|
||
# 如nestjs连接mysql和redis,可以通过容器名来互相通信
|
||
# networks:
|
||
# drive-server:
|