Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02d8b12

Browse filesBrowse files
committed
Prefer bin/metacpan-docker exec over bin/metacpan-docker run --rm
They're semantically different (the latter actually creates a temporary container) but the effect is the same.
1 parent 80132a9 commit 02d8b12
Copy full SHA for 02d8b12

File tree

Expand file treeCollapse file tree

1 file changed

+12
-17
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-17
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+12-17Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ready when the services start listening on the ports listed above.
3535
Don't forget to seed the local `metacpan-api` with a partial CPAN; run
3636
the following command in a separate terminal to get you up to speed:
3737

38-
bin/metacpan-docker localapi run --rm api index-cpan.sh
38+
bin/metacpan-docker localapi exec api index-cpan.sh
3939

4040
This will prompt you to confirm removing old indices and setting up
4141
mappings on the ElasticSearch service (say `YES`) then proceed to rsync
@@ -150,7 +150,7 @@ localapi up` runs:
150150

151151
Running
152152

153-
bin/metacpan-docker localapi run --rm api partial-cpan-mirror.sh
153+
bin/metacpan-docker localapi exec api partial-cpan-mirror.sh
154154

155155
will `rsync` modules selected CPAN authors, plus the package and author
156156
indices, into the `api` service's `/CPAN` directory. This is nearly
@@ -162,10 +162,10 @@ equivalent to the same script in the [metacpan-developer][7] repository.
162162

163163
Running
164164

165-
bin/metacpan-docker localapi run --rm api bin/run bin/metacpan mapping --delete
166-
bin/metacpan-docker localapi run --rm api bin/run bin/metacpan release /CPAN/authors/id
167-
bin/metacpan-docker localapi run --rm api bin/run bin/metacpan latest
168-
bin/metacpan-docker localapi run --rm api bin/run bin/metacpan author
165+
bin/metacpan-docker localapi exec api bin/run bin/metacpan mapping --delete
166+
bin/metacpan-docker localapi exec api bin/run bin/metacpan release /CPAN/authors/id
167+
bin/metacpan-docker localapi exec api bin/run bin/metacpan latest
168+
bin/metacpan-docker localapi exec api bin/run bin/metacpan author
169169

170170
in sequence will create the indices and mappings in the `elasticsearch`
171171
service, and import the `/CPAN` data into `elasticsearch`.
@@ -174,15 +174,10 @@ service, and import the `/CPAN` data into `elasticsearch`.
174174

175175
If you're impatient or lazy to do all the above, just running
176176

177-
bin/metacpan-docker localapi run --rm api index-cpan.sh
177+
bin/metacpan-docker localapi exec api index-cpan.sh
178178

179179
instead will set it all up for you.
180180

181-
By the way, in case you're curious: these `localapi run` commands start
182-
a temporary container separate from the service containers; the `--rm`
183-
flag tells the underlying `docker-compose` to remove this container
184-
afterwards.
185-
186181
#### elasticsearch and elasticsearch_test
187182

188183
The `elasticsearch` and `elasticsearch_test` services uses the
@@ -219,13 +214,13 @@ a better part of a day or two, depending on your hardware.
219214
Use `bin/metacpan-docker run` and similar:
220215

221216
# Run tests for metacpan-web against fastapi.metacpan.org
222-
bin/metacpan-docker run --rm web bin/prove
217+
bin/metacpan-docker exec web bin/prove
223218

224219
# Run tests for metacpan-web against local api
225-
bin/metacpan-docker localapi run --rm web bin/prove
220+
bin/metacpan-docker localapi exec web bin/prove
226221

227222
# Run tests for metacpan-api against local elasticsearch_test
228-
bin/metacpan-docker localapi run --rm api bin/prove
223+
bin/metacpan-docker localapi exec api bin/prove
229224

230225
### Updating Carton dependencies
231226

@@ -234,9 +229,9 @@ clean [Perl][10] containers, it is possible to maintain a clean set of
234229
Carton dependencies independent of your host machine's perl. Just
235230
update the `cpanfile` of the project, and run
236231

237-
bin/metacpan-docker run --rm web carton install
232+
bin/metacpan-docker exec web carton install
238233
# or
239-
bin/metacpan-docker run --rm api carton install
234+
bin/metacpan-docker exec api carton install
240235

241236
Due to the way the Compose services are configured, these commands will
242237
update the corresponding `cpanfile.snapshot` safely, even if you do _or_

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.