@@ -35,7 +35,7 @@ ready when the services start listening on the ports listed above.
35
35
Don't forget to seed the local ` metacpan-api ` with a partial CPAN; run
36
36
the following command in a separate terminal to get you up to speed:
37
37
38
- bin/metacpan-docker localapi run --rm api index-cpan.sh
38
+ bin/metacpan-docker localapi exec api index-cpan.sh
39
39
40
40
This will prompt you to confirm removing old indices and setting up
41
41
mappings on the ElasticSearch service (say ` YES ` ) then proceed to rsync
@@ -150,7 +150,7 @@ localapi up` runs:
150
150
151
151
Running
152
152
153
- bin/metacpan-docker localapi run --rm api partial-cpan-mirror.sh
153
+ bin/metacpan-docker localapi exec api partial-cpan-mirror.sh
154
154
155
155
will ` rsync ` modules selected CPAN authors, plus the package and author
156
156
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.
162
162
163
163
Running
164
164
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
169
169
170
170
in sequence will create the indices and mappings in the ` elasticsearch `
171
171
service, and import the ` /CPAN ` data into ` elasticsearch ` .
@@ -174,15 +174,10 @@ service, and import the `/CPAN` data into `elasticsearch`.
174
174
175
175
If you're impatient or lazy to do all the above, just running
176
176
177
- bin/metacpan-docker localapi run --rm api index-cpan.sh
177
+ bin/metacpan-docker localapi exec api index-cpan.sh
178
178
179
179
instead will set it all up for you.
180
180
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
-
186
181
#### elasticsearch and elasticsearch_test
187
182
188
183
The ` elasticsearch ` and ` elasticsearch_test ` services uses the
@@ -219,13 +214,13 @@ a better part of a day or two, depending on your hardware.
219
214
Use ` bin/metacpan-docker run ` and similar:
220
215
221
216
# 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
223
218
224
219
# 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
226
221
227
222
# 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
229
224
230
225
### Updating Carton dependencies
231
226
@@ -234,9 +229,9 @@ clean [Perl][10] containers, it is possible to maintain a clean set of
234
229
Carton dependencies independent of your host machine's perl. Just
235
230
update the ` cpanfile ` of the project, and run
236
231
237
- bin/metacpan-docker run --rm web carton install
232
+ bin/metacpan-docker exec web carton install
238
233
# or
239
- bin/metacpan-docker run --rm api carton install
234
+ bin/metacpan-docker exec api carton install
240
235
241
236
Due to the way the Compose services are configured, these commands will
242
237
update the corresponding ` cpanfile.snapshot ` safely, even if you do _ or_
0 commit comments