Skip to content

Commit 700428f

Browse files
committed
EE updates
1 parent dcf654c commit 700428f

File tree

4 files changed

+106
-18
lines changed

4 files changed

+106
-18
lines changed

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# dogvscat (Work In Progress)
1+
# dogvscat (Work In Progress. This How-To Isn't Finished Yet)
22

33
This repo gives a few examples of patterns for how you might build Docker Swarm clusters with all the bells and whistles.
44

@@ -60,4 +60,17 @@ Then just create a single-node Swarm in that engine:
6060

6161
## Deploying the Swarm EE Example
6262

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`

stack-ee-ghost.yml

+5-16
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,27 @@ services:
44

55
ghost:
66
image: ghost:1-alpine
7-
networks:
8-
- proxy
9-
- ghost
107
environment:
118
# see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
129
database__client: mysql
1310
database__connection__host: db
1411
database__connection__user: root
1512
database__connection__password: OpdP2dy4jzAT
1613
database__connection__database: ghost
17-
url: http://ghost.dogvs.cat
14+
url: http://ghost.dogvscat.biz
1815
deploy:
1916
replicas: 1
2017
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+
2422
db:
2523
image: mysql:5.7
2624
volumes:
2725
- db:/var/lib/mysql
2826
secrets:
2927
- ghost-db-password
30-
networks:
31-
- ghost
3228
deploy:
3329
endpoint_mode: dnsrr
3430
environment:
@@ -41,19 +37,12 @@ services:
4137
- db-backup:/backup
4238
secrets:
4339
- ghost-db-password
44-
networks:
45-
- ghost
4640
environment:
4741
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/ghost-db-password
4842

4943
#TODO: backup for static content
5044

5145

52-
networks:
53-
ghost: {}
54-
proxy:
55-
external: true
56-
5746
volumes:
5847
db:
5948
driver: cloudstor:latest

stack-ee-menu.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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: {}

stack-ee-voting.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+

0 commit comments

Comments
 (0)