Skip to content

Commit 72a78b9

Browse files
authored
Merge pull request #102 from metacpan/oalders/tidy-readme
Tidy some of README
2 parents 36f2ddf + 49a7884 commit 72a78b9

File tree

1 file changed

+34
-41
lines changed

1 file changed

+34
-41
lines changed

README.md

+34-41
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ Then, clone this repo and set up the environment:
9292

9393
The `bin/metacpan-docker init` command clones the source repositories for:
9494

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`
9999

100100
These repositories are automatically mounted into the appropriate docker
101101
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:
118118
docker-compose exec api index-cpan.sh
119119

120120
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.
123123

124124
Once the above is done, you should be able to see your local partial CPAN data
125125
in e.g. [http://localhost:5001/recent](http://localhost:5001/recent) and
@@ -150,9 +150,7 @@ For further details, read on!
150150
You can (re)build arbitrary containers. For instance, if you want to rebuild
151151
the `api` container:
152152

153-
```
154-
docker-compose build api
155-
```
153+
docker-compose build api
156154

157155
### Accessing Containers
158156

@@ -181,21 +179,19 @@ are available in the developer environment via ports on the host system.
181179
We are using [traefik][13] to manage the traffic between services.
182180
The current configuration is:
183181

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)
187185

188186
In order to access to the localhost subdomains, you probably have to manually
189187
add these entries in you `/etc/hosts` file.
190188

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
199195

200196
You can access the dashboard configuration via:
201197
[http://metacpan.localhost:8080](http://metacpan.localhost:8080)
@@ -216,19 +212,16 @@ The local instance of the web front end is accessible via:
216212

217213
#### `Elasticsearch`
218214

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.
220217

221218
You can query the `elasticsearch` container via:
222219

223-
```
224-
docker-compose exec elasticsearch curl http://localhost:9200
225-
```
220+
docker-compose exec elasticsearch curl http://localhost:9200
226221

227222
You can query the `elasticsearch_test` container via:
228223

229-
```
230-
docker-compose exec elasticsearch_test curl http://localhost:9200
231-
```
224+
docker-compose exec elasticsearch_test curl http://localhost:9200
232225

233226
#### `PostgreSQL`
234227

@@ -247,25 +240,25 @@ Note: this is using a smaller, frozen version of `metacpan-cpan-extracted` via
247240

248241
The system consists of several services that live in docker containers:
249242

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)
258251

259252
These services use one or more Docker volumes:
260253

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
265258
installed by [Carton][4] for the `api` and `web` services, respectively;
266259
mounted on `/carton` instead of `local`, to prevent clashing with the host
267260
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
269262
versions. This is mounted in `/shared/metacpan_git`.
270263
This can be either `metacpan-cpan-extracted` or `metacpan-cpan-extracted-lite`.
271264
The volume is bound to the local repo at `${PWD}/src/metacpan-cpan-extracted`.
@@ -472,7 +465,7 @@ configuring e.g. a `kibana` service.
472465

473466
If you run `docker ps` you'll see the containers. You might see something like:
474467

475-
```
468+
```bash
476469
$ docker ps
477470
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
478471
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

Comments
 (0)