File tree 4 files changed +106
-18
lines changed
4 files changed +106
-18
lines changed Original file line number Diff line number Diff line change 1
- # dogvscat (Work In Progress)
1
+ # dogvscat (Work In Progress. This How-To Isn't Finished Yet )
2
2
3
3
This repo gives a few examples of patterns for how you might build Docker Swarm clusters with all the bells and whistles.
4
4
@@ -60,4 +60,17 @@ Then just create a single-node Swarm in that engine:
60
60
61
61
## Deploying the Swarm EE Example
62
62
63
- TODO
63
+ ## Other Notes
64
+
65
+ ### Using Docker Machine? Really???
66
+ - Don't throw out the good in search of the perfect
67
+ - DM works fine solo admins with 3-20 cloud servers
68
+ - Be sure to backup certs from .docker/machine/machines
69
+ - If you're a team of 2-3 and still want to try sticking with DM, maybe try:
70
+ - https://github.com/bhurlow/machine-share
71
+ - https://github.com/efrecon/machinery
72
+
73
+ ### Swarm Visualizer
74
+ - You can optionally deploy ` stack-visualizer.yml ` early on to see how your stacks and services fill out your swarm on port 4040.
75
+
76
+ ` docker stack deploy -c stack-visualizer.yml viz `
Original file line number Diff line number Diff line change @@ -4,31 +4,27 @@ services:
4
4
5
5
ghost :
6
6
image : ghost:1-alpine
7
- networks :
8
- - proxy
9
- - ghost
10
7
environment :
11
8
# see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
12
9
database__client : mysql
13
10
database__connection__host : db
14
11
database__connection__user : root
15
12
database__connection__password : OpdP2dy4jzAT
16
13
database__connection__database : ghost
17
- url : http://ghost.dogvs.cat
14
+ url : http://ghost.dogvscat.biz
18
15
deploy :
19
16
replicas : 1
20
17
labels :
21
- - traefik.port=2368
22
- - traefik.docker.network=proxy
23
- - traefik.frontend.rule=Host:ghost.dogvs.cat
18
+ com.docker.lb.port : 2368
19
+ com.docker.lb.hosts : ghost.dogvscat.biz
20
+
21
+
24
22
db :
25
23
image : mysql:5.7
26
24
volumes :
27
25
- db:/var/lib/mysql
28
26
secrets :
29
27
- ghost-db-password
30
- networks :
31
- - ghost
32
28
deploy :
33
29
endpoint_mode : dnsrr
34
30
environment :
@@ -41,19 +37,12 @@ services:
41
37
- db-backup:/backup
42
38
secrets :
43
39
- ghost-db-password
44
- networks :
45
- - ghost
46
40
environment :
47
41
MYSQL_ROOT_PASSWORD_FILE : /run/secrets/ghost-db-password
48
42
49
43
# TODO: backup for static content
50
44
51
45
52
- networks :
53
- ghost : {}
54
- proxy :
55
- external : true
56
-
57
46
volumes :
58
47
db :
59
48
driver : cloudstor:latest
Original file line number Diff line number Diff line change
1
+ version : ' 3.2'
2
+
3
+ services :
4
+
5
+ menu :
6
+ image : bretfisher/dogvscat-menu:ee
7
+ build :
8
+ context : menu
9
+ networks :
10
+ - menu
11
+ deploy :
12
+ replicas : 3
13
+ labels :
14
+ com.docker.lb.port : 80
15
+ com.docker.lb.hosts : www.dogvscat.biz
16
+ com.docker.lb.network : menu
17
+
18
+ networks :
19
+ menu : {}
Original file line number Diff line number Diff line change
1
+ version : ' 3.2'
2
+
3
+ services :
4
+
5
+ redis :
6
+ image : redis:alpine
7
+ command : redis-server --appendonly yes
8
+ volumes :
9
+ - redis-data:/data
10
+ networks :
11
+ - frontend
12
+ deploy :
13
+ endpoint_mode : dnsrr
14
+
15
+ db :
16
+ image : postgres:9.6
17
+ volumes :
18
+ - db-data:/var/lib/postgresql/data
19
+ networks :
20
+ - backend
21
+ deploy :
22
+ endpoint_mode : dnsrr
23
+
24
+ vote :
25
+ image : bretfisher/examplevotingapp_vote
26
+ networks :
27
+ - frontend
28
+ deploy :
29
+ replicas : 1
30
+ labels :
31
+ com.docker.lb.port : 80
32
+ com.docker.lb.hosts : vote.dogvscat.biz
33
+ com.docker.lb.network : frontend
34
+
35
+ result :
36
+ image : bretfisher/examplevotingapp_result
37
+ networks :
38
+ - backend
39
+ deploy :
40
+ labels :
41
+ com.docker.lb.port : 80
42
+ com.docker.lb.hosts : result.dogvscat.biz
43
+ com.docker.lb.network : backend
44
+
45
+ worker :
46
+ image : bretfisher/examplevotingapp_worker:java
47
+ networks :
48
+ - frontend
49
+ - backend
50
+ deploy :
51
+ replicas : 1
52
+
53
+
54
+ networks :
55
+ frontend : {}
56
+ backend : {}
57
+
58
+ volumes :
59
+ db-data :
60
+ driver : cloudstor:latest
61
+ driver_opts :
62
+ size : 1
63
+ redis-data :
64
+ driver : cloudstor:latest
65
+ driver_opts :
66
+ size : 1
67
+
You can’t perform that action at this time.
0 commit comments