Skip to content

Commit 8c96b97

Browse files
Travis SpangleTravis Spangle
Travis Spangle
authored and
Travis Spangle
committed
completed chapter 14
1 parent f1add1f commit 8c96b97

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Docker for Rails.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,7 @@ We can scale our intansted with
186186
I'm wondering if there's a way we can respond to the request load to auto scale these instances.
187187

188188
This chapter was awesome! Being able to deploy to a virtual box allows me to practice and learn these commands before going into a production environment.
189+
190+
## Chapter 14
191+
192+
I'm impressed with docker-machine. I have a long history of sys admin / dev ops. Some of my previous positions have been 30%+ provisioning and maintaining servers. With these tools I could knock that down to less than 10%. This book doesn't cover swarm that much but in previous courses I've configured it to stop instances consuming too many resources and starting fresh.

myapp/docker-stack.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ services:
99
env_file:
1010
- .env/production/database
1111
- .env/production/web
12+
deploy:
13+
replicas: 2
1214

1315
redis:
1416
image: redis
@@ -20,6 +22,16 @@ services:
2022
volumes:
2123
- db_data:/var/lib/postgresql/data
2224

25+
visualizer:
26+
image: dockersamples/visualizer:stable
27+
ports:
28+
- "8080:8080"
29+
volumes:
30+
- "/var/run/docker.sock:/var/run/docker.sock"
31+
deploy:
32+
placement:
33+
constraints: [node.role == manager]
34+
2335
db-migrator:
2436
image: presstheredbutton/myapp_web:prod
2537
command: ["./wait-for", "--timeout=300", "database:5432", "--",

0 commit comments

Comments
 (0)