-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
53 lines (48 loc) · 1.16 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## 开启 swarm,如果已经开了就不用开了否则error
# docker swarm init
## 部署与更新部署
# docker stack deploy -c docker-compose.yml pomelo-swarm
#
## 看状态
# docker stack ps pomelo-swarm
### 服务情况
# docker service ls
#
## 进入 container
### 找到 container, 如果没开成功用 docker container ls -a 看全部
# docker container ls
### 进入 container 的 bash
# docker exec -it e9410ee182bd /bin/bash
version: '3.1'
services:
# visit: http://127.0.0.1:33001/
pomelo:
image: hustlion/pomelo:0.1.1
deploy:
restart_policy:
condition: on-failure
ports:
- 33001:3001
- 33014:33014
- 33050:33050
- 33051:33051
- 33052:33052
volumes:
- "/Users/hustlion/tmp/docker/tmpData:/data"
- "/Users/hustlion/hugo/game/pomelo:/code"
networks:
- pomelo-net
# visit: http://localhost:38080/
visualizer:
image: dockersamples/visualizer:stable
ports:
- "38080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
networks:
- pomelo-net
networks:
pomelo-net: