digiHome-SP-NestJs/docker-compose.yml
2023-08-10 10:46:53 +08:00

26 lines
707 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: "3.0"
services:
server:
# nestjs服务
container_name: zjg-server
build:
# 根据Dockerfile构建镜像
context: .
dockerfile: Dockerfile
ports:
- 60036:60036
restart: on-failure # 设置自动重启这一步必须设置主要是存在mysql还没有启动完成就启动了node服务
environment:
host: "192.168.10.4"
port: 3306
user: "root"
password: "123456"
database: "finclip"
# # 声明一下网桥 my-server。
# # 重要:将所有服务都挂载在同一网桥即可通过容器名来互相通信了
# # 如nestjs连接mysql和redis可以通过容器名来互相通信
# networks:
# zjg-server: