@@ -92,10 +92,10 @@ Then, clone this repo and set up the environment:
92
92
93
93
The ` bin/metacpan-docker init ` command clones the source repositories for:
94
94
95
- - ` metacpan-web `
96
- - ` metacpan-api `
97
- - ` metacpan-grep-front-end `
98
- - ` metacpan-cpan-extracted-lite `
95
+ * ` metacpan-web `
96
+ * ` metacpan-api `
97
+ * ` metacpan-grep-front-end `
98
+ * ` metacpan-cpan-extracted-lite `
99
99
100
100
These repositories are automatically mounted into the appropriate docker
101
101
containers allowing the developer to use their preferred tools to work with the
@@ -118,8 +118,8 @@ following command in a separate terminal to get yourself up to speed:
118
118
docker-compose exec api index-cpan.sh
119
119
120
120
This will prompt you to confirm removing old indices and setting up mappings on
121
- the Elasticsearch service (say ` YES ` ). It will then proceed to rsync a partial CPAN in
122
- ` /CPAN ` for its metadata to be imported.
121
+ the Elasticsearch service (say ` YES ` ). It will then proceed to rsync a partial
122
+ CPAN in ` /CPAN ` for its metadata to be imported.
123
123
124
124
Once the above is done, you should be able to see your local partial CPAN data
125
125
in e.g. [ http://localhost:5001/recent ] ( http://localhost:5001/recent ) and
@@ -150,9 +150,7 @@ For further details, read on!
150
150
You can (re)build arbitrary containers. For instance, if you want to rebuild
151
151
the ` api ` container:
152
152
153
- ```
154
- docker-compose build api
155
- ```
153
+ docker-compose build api
156
154
157
155
### Accessing Containers
158
156
@@ -181,21 +179,19 @@ are available in the developer environment via ports on the host system.
181
179
We are using [ traefik] [ 13 ] to manage the traffic between services.
182
180
The current configuration is:
183
181
184
- - api: [ http://api.metacpan.localhost ] ( http://api.metacpan.localhost )
185
- - web: [ http://web.metacpan.localhost ] ( http://web.metacpan.localhost )
186
- - grep: [ http://grep.metacpan.localhost ] ( http://grep.metacpan.localhost )
182
+ * api: [ http://api.metacpan.localhost ] ( http://api.metacpan.localhost )
183
+ * web: [ http://web.metacpan.localhost ] ( http://web.metacpan.localhost )
184
+ * grep: [ http://grep.metacpan.localhost ] ( http://grep.metacpan.localhost )
187
185
188
186
In order to access to the localhost subdomains, you probably have to manually
189
187
add these entries in you ` /etc/hosts ` file.
190
188
191
- ```
192
- # add to /etc/hosts
193
- 127.0.0.1 api.metacpan.localhost
194
- 127.0.0.1 gh.metacpan.localhost
195
- 127.0.0.1 grep.metacpan.localhost
196
- 127.0.0.1 metacpan.localhost
197
- 127.0.0.1 web.metacpan.localhost
198
- ```
189
+ # add to /etc/hosts
190
+ 127.0.0.1 api.metacpan.localhost
191
+ 127.0.0.1 gh.metacpan.localhost
192
+ 127.0.0.1 grep.metacpan.localhost
193
+ 127.0.0.1 metacpan.localhost
194
+ 127.0.0.1 web.metacpan.localhost
199
195
200
196
You can access the dashboard configuration via:
201
197
[ http://metacpan.localhost:8080 ] ( http://metacpan.localhost:8080 )
@@ -216,19 +212,16 @@ The local instance of the web front end is accessible via:
216
212
217
213
#### ` Elasticsearch `
218
214
219
- The ` elasticsearch ` and ` elasticsearch_test ` containers are not exposed directly. They are available via the ` api ` and ` api_test ` containers.
215
+ The ` elasticsearch ` and ` elasticsearch_test ` containers are not exposed
216
+ directly. They are available via the ` api ` and ` api_test ` containers.
220
217
221
218
You can query the ` elasticsearch ` container via:
222
219
223
- ```
224
- docker-compose exec elasticsearch curl http://localhost:9200
225
- ```
220
+ docker-compose exec elasticsearch curl http://localhost:9200
226
221
227
222
You can query the ` elasticsearch_test ` container via:
228
223
229
- ```
230
- docker-compose exec elasticsearch_test curl http://localhost:9200
231
- ```
224
+ docker-compose exec elasticsearch_test curl http://localhost:9200
232
225
233
226
#### ` PostgreSQL `
234
227
@@ -247,25 +240,25 @@ Note: this is using a smaller, frozen version of `metacpan-cpan-extracted` via
247
240
248
241
The system consists of several services that live in docker containers:
249
242
250
- - ` web ` — the web interface on [ http://localhost:5001 ] ( http://localhost:5001 )
251
- - ` api ` — the main server on [ http://localhost:5000 ] ( http://localhost:5000 )
252
- - ` api_test ` — the api server for running tests via ` prove `
253
- - ` elasticsearch ` — database for ` api `
254
- - ` elasticsearch_test ` — database for ` api_test `
255
- - ` pgdb ` - PostgreSQL database container
256
- - ` logspout ` - Docker log interface to [ honeycomb.io] ( https://honeycomb.io )
257
- - ` grep ` - the web interface for grep.metacpan on [ http://localhost:3001 ] ( http://localhost:3001 )
243
+ * ` web ` — the web interface on [ http://localhost:5001 ] ( http://localhost:5001 )
244
+ * ` api ` — the main server on [ http://localhost:5000 ] ( http://localhost:5000 )
245
+ * ` api_test ` — the api server for running tests via ` prove `
246
+ * ` elasticsearch ` — database for ` api `
247
+ * ` elasticsearch_test ` — database for ` api_test `
248
+ * ` pgdb ` - PostgreSQL database container
249
+ * ` logspout ` - Docker log interface to [ honeycomb.io] ( https://honeycomb.io )
250
+ * ` grep ` - the web interface for grep.metacpan on [ http://localhost:3001 ] ( http://localhost:3001 )
258
251
259
252
These services use one or more Docker volumes:
260
253
261
- - ` metacpan_cpan ` : holds the CPAN archive, mounted in ` /CPAN `
262
- - ` metacpan_elasticsearch ` : holds the Elasticsearch database files
263
- - ` metacpan_elasticsearch_test ` : holds the Elasticsearch test database files
264
- - ` metacpan_api_carton ` and ` metacpan_web_carton ` : holds the dependencies
254
+ * ` metacpan_cpan ` : holds the CPAN archive, mounted in ` /CPAN `
255
+ * ` metacpan_elasticsearch ` : holds the Elasticsearch database files
256
+ * ` metacpan_elasticsearch_test ` : holds the Elasticsearch test database files
257
+ * ` metacpan_api_carton ` and ` metacpan_web_carton ` : holds the dependencies
265
258
installed by [ Carton] [ 4 ] for the ` api ` and ` web ` services, respectively;
266
259
mounted on ` /carton ` instead of ` local ` , to prevent clashing with the host
267
260
user's Carton
268
- - ` metacpan_git_shared ` : points to the git repo containing all extracted CPAN
261
+ * ` metacpan_git_shared ` : points to the git repo containing all extracted CPAN
269
262
versions. This is mounted in ` /shared/metacpan_git ` .
270
263
This can be either ` metacpan-cpan-extracted ` or ` metacpan-cpan-extracted-lite ` .
271
264
The volume is bound to the local repo at ` ${PWD}/src/metacpan-cpan-extracted ` .
@@ -472,7 +465,7 @@ configuring e.g. a `kibana` service.
472
465
473
466
If you run ` docker ps ` you'll see the containers. You might see something like:
474
467
475
- ```
468
+ ``` bash
476
469
$ docker ps
477
470
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
478
471
2efb9c475c83 metacpan-web:latest " carton exec plackup…" 12 hours ago Up 12 hours 0.0.0.0:5001-> 5001/tcp metacpan_web_1
0 commit comments