Skip to content

Commit 1d02fe8

Browse files
committed
fix typos, word repetitions, missing characters
1 parent e6536d4 commit 1d02fe8

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

chapter_09_docker.asciidoc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ and where testing fits in.
325325

326326
**Third chapter: Automated deployment to real servers**
327327

328-
* Gradually build up an Ansible playbook to deplor our containers on a real server
328+
* Gradually build up an Ansible playbook to deploy our containers on a real server
329329

330330
* Again, use our FTs to check for any problems
331331

@@ -386,7 +386,7 @@ and to use a real server instead.
386386
our "real" server.
387387

388388

389-
NOTE: A clarification: in these chapter,
389+
NOTE: A clarification: in these chapters,
390390
we run tests _against_ our Docker container, or _against_ our staging server,
391391
but that doesn't mean we run the tests _from_ Docker or _from_ our staging server.
392392
We still run the tests from our own laptop,
@@ -407,7 +407,7 @@ OK
407407

408408
And now we can try them against our docker server URL,
409409
which once we've done the right docker magic,
410-
will be at _http://locahost:8888_
410+
will be at _http://localhost:8888_
411411

412412
TIP: I'm deliberately choosing a different port to run Dockerised Django on (8888)
413413
from the default port that a local `manage.py runserver` would choose (8080),
@@ -436,7 +436,7 @@ test_can_start_a_todo_list
436436
selenium.common.exceptions.WebDriverException: Message: Reached error page: abo
437437
ut:neterror?e=connectionFailure&u=http%3A//localhost:8888/&c=UTF-8&
438438
f=regular&d=Firefox%20can%27t%20establish%20a%20connection%20to%20the%20server%
439-
20at%20locahost.
439+
20at%20localhost.
440440
441441
442442
Ran 1 tests in 5.518s
@@ -542,7 +542,7 @@ so I decided to stick with Docker. But you could definitely check it out!
542542
543543
You can follow along all the instructions in the book
544544
by just substituing the `docker` binary for `podman` in all the CLI instructions,
545-
eg
545+
e.g.
546546
547547
[role="skipme"]
548548
[subs="specialcharacters,quotes"]
@@ -711,7 +711,7 @@ rather than just manually pip installing things
711711
one by one, and having to remember to sync things
712712
between local dev and docker,
713713
we can "save" the list of packages we're using
714-
by creating a 'requirements.txt' filefootnote:[
714+
by creating a 'requirements.txt' file.footnote:[
715715
There are many other dependency management tools these days
716716
so requirements.txt is not the only way to do it,
717717
although it is one of the oldest and best established.
@@ -1116,13 +1116,13 @@ curl: (52) Empty reply from server
11161116
==== Essential Googling the Error Message
11171117

11181118
The need to map ports and the `-p` argument to `docker run` are something you just learn,
1119-
fairly on in learning Docker. But the next debugging step is quite a bit more obscure
1119+
fairly early on in learning Docker. But the next debugging step is quite a bit more obscure
11201120
(although admittedly Itamar does address it in his
11211121
https://pythonspeed.com/articles/docker-connection-refused/[docker networking article],
11221122
did I already mention how excellent it is?).
11231123

11241124

1125-
But if we haven't read that, we can always resort to resort to the tried and tested "Googling the error message" technique instead
1125+
But if we haven't read that, we can always resort to the tried and tested "Googling the error message" technique instead
11261126
(<<googling-the-error>>).
11271127

11281128

@@ -1189,7 +1189,7 @@ Looking good!
11891189
.On Debugging
11901190
*******************************************************************************
11911191
Let me let you in on a little secret. I'm actually bad at debugging.
1192-
We all have our psychological strengths and weakness,
1192+
We all have our psychological strengths and weaknesses,
11931193
and one of my weaknesses is
11941194
that when I run into a problem I can't see an obvious solution to,
11951195
I want to throw up my hands way too soon
@@ -1285,7 +1285,7 @@ Run 'python manage.py migrate' to apply them.
12851285

12861286
NOTE: If you don't see this error,
12871287
it's because your src folder had the database file in it, unlike mine.
1288-
For the sake of argument, run `rm src/db.sqlite` and re-run the build & run commands,
1288+
For the sake of argument, run `rm src/db.sqlite3` and re-run the build & run commands,
12891289
and you should be able to repro the error. I promise it's instructive!
12901290

12911291

@@ -1371,13 +1371,14 @@ Running migrations:
13711371
Applying contenttypes.0001_initial... OK
13721372
[...]
13731373
Applying sessions.0001_initial... OK
1374-
[...]
13751374
$ *docker build -t superlists . && docker run \
13761375
-p 8888:8888 \
13771376
-v ./src/db.sqlite3:/src/db.sqlite3 \
13781377
-it superlists*
13791378
----
13801379

1380+
//CSANAD: sessions.0001_initial is the last migration on the last line, removed `[...]`
1381+
13811382
TIP: if you see an error saying: `django.db.utils.OperationalError`: "unable to open database file",
13821383
try stopping the container, `rm -rf src/db.sqlite3`, then re-run the migrate command
13831384
_outside_ the container, and the rebuild and run your image.
@@ -1435,7 +1436,7 @@ Tests and small steps some of the uncertainty out of deployment::
14351436
For developers, ops and infra work is always "fun",
14361437
by which I mean a process full of uncertainty and surprises.
14371438
My aim during this chapter was to show that a step-by-step approach
1438-
helps to minimse risk, especially when allied to a functional test suite
1439+
helps to minimise risk, especially when allied to a functional test suite
14391440
that can help us to catch errors early.
14401441
14411442
// TODO amend the rest

0 commit comments

Comments
 (0)