|
@@ -104,6 +104,50 @@ services:
|
|
|
- .:/app # 如果需要将本地代码挂载到容器中进行开发
|
|
|
- ./config:/config # 挂载宿主机的配置文件目录到容器内的 /config
|
|
|
restart: always
|
|
|
+ command: ["sh","-c","./game game --path=/config/profile-gc.json --node=10001"]
|
|
|
+ networks:
|
|
|
+ - my_custom_network
|
|
|
+ depends_on:
|
|
|
+ - etcd
|
|
|
+ - nats
|
|
|
+ - redis
|
|
|
+ - mongodb
|
|
|
+ - center
|
|
|
+
|
|
|
+ game-2:
|
|
|
+ build:
|
|
|
+ context: ./game
|
|
|
+ dockerfile: Dockerfile
|
|
|
+ container_name: game-2
|
|
|
+ environment:
|
|
|
+ - GO_ENV=development # 可以根据需要设置环境变量
|
|
|
+ volumes:
|
|
|
+ - .:/app # 如果需要将本地代码挂载到容器中进行开发
|
|
|
+ - ./config:/config # 挂载宿主机的配置文件目录到容器内的 /config
|
|
|
+ restart: always
|
|
|
+ command: ["sh","-c","./game game --path=/config/profile-gc.json --node=10002"]
|
|
|
+ networks:
|
|
|
+ - my_custom_network
|
|
|
+ depends_on:
|
|
|
+ - etcd
|
|
|
+ - nats
|
|
|
+ - redis
|
|
|
+ - mongodb
|
|
|
+ - center
|
|
|
+
|
|
|
+
|
|
|
+ game-3:
|
|
|
+ build:
|
|
|
+ context: ./game
|
|
|
+ dockerfile: Dockerfile
|
|
|
+ container_name: game-3
|
|
|
+ environment:
|
|
|
+ - GO_ENV=development # 可以根据需要设置环境变量
|
|
|
+ volumes:
|
|
|
+ - .:/app # 如果需要将本地代码挂载到容器中进行开发
|
|
|
+ - ./config:/config # 挂载宿主机的配置文件目录到容器内的 /config
|
|
|
+ restart: always
|
|
|
+ command: [ "sh","-c","./game game --path=/config/profile-gc.json --node=10003" ]
|
|
|
networks:
|
|
|
- my_custom_network
|
|
|
depends_on:
|