From 17f88a7bdf2151d083fc52d5abc6b3574f559bcd Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Fri, 23 May 2025 23:24:41 +0200 Subject: [PATCH 1/4] Fix the order of instructions for initialization Following the steps for initialization, I had to kickstart the web server before I was able to browse through port 5001. Apparently, the web server isn't automatically started. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 21d9a25..7951bd7 100644 --- a/README.md +++ b/README.md @@ -130,15 +130,15 @@ This will prompt you to confirm removing old indices and setting up mappings on the Elasticsearch service (say `YES`). It will then proceed to rsync a partial CPAN in `/CPAN` for its metadata to be imported. -Once the above is done, you should be able to see your local partial CPAN data -in e.g. [http://localhost:5001/recent](http://localhost:5001/recent) and -elsewhere. - -Alternatively, if you just want to hack on the web frontend, you can run this -instead of all the above: +After the initialization above completes, the next step is to start the web +frontend with the following command: docker compose up web-server +Once that is done, you should be able to see your local partial CPAN data +in e.g. [http://localhost:5001/recent](http://localhost:5001/recent) and +elsewhere. + From here, you can proceed and hack on the MetaCPAN code at `src/metacpan-api` and/or `src/metacpan-web` directories, and saving edits will reload the corresponding apps automatically! From 2011e25a40061b314df78d824466607822ceb5f6 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sat, 24 May 2025 00:22:07 +0200 Subject: [PATCH 2/4] Remove reference to traefik Since Traefik isn't used... --- README.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/README.md b/README.md index 7951bd7..5f20608 100644 --- a/README.md +++ b/README.md @@ -185,28 +185,6 @@ To access the `psql` command line client in the PostgreSQL container: Each container is responsible for a different service. Some of these services are available in the developer environment via ports on the host system. -We are using [traefik][13] to manage the traffic between services. The current -configuration is: - -- api: [http://api.metacpan.localhost](http://api.metacpan.localhost) -- web: [http://web.metacpan.localhost](http://web.metacpan.localhost) -- grep: [http://grep.metacpan.localhost](http://grep.metacpan.localhost) - -In order to access to the localhost subdomains, you probably have to manually -add these entries in you `/etc/hosts` file. - - # add to /etc/hosts - 127.0.0.1 api.metacpan.localhost - 127.0.0.1 gh.metacpan.localhost - 127.0.0.1 grep.metacpan.localhost - 127.0.0.1 metacpan.localhost - 127.0.0.1 web.metacpan.localhost - -You can access the dashboard configuration via: -[http://metacpan.localhost:8080](http://metacpan.localhost:8080) - -[0]: https://docs.traefik.io/providers/docker/ - #### `web` The local instance of the web front end is accessible via: From 69b77624dba3229ead3f789e85fa8de21b46388a Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sat, 24 May 2025 00:40:49 +0200 Subject: [PATCH 3/4] Expose grep container ports ... So the port number can be used in the README. --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 463cea7..854e883 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -182,6 +182,8 @@ services: profiles: - grep image: metacpan/metacpan-grep-front-end:latest + ports: + - "3000:3000" build: context: ./src/metacpan-grep-front-end volumes: From 6515045774d6f92c172e0f9f4fe898e41906af0d Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sat, 24 May 2025 00:58:25 +0200 Subject: [PATCH 4/4] Change "grep" access references --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f20608..8bf4b24 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ The PostgreSQL service by default is only accessible from other containers. The grep metacpan front end is accessible via: -- [http://grep.metacpan.localhost](http://grep.metacpan.localhost) +- [http://localhost:3000](http://localhost:3000) Note: this is using a smaller, frozen version of `metacpan-cpan-extracted` via [metacpan-cpan-extracted-lite](https://github.com/metacpan/metacpan-cpan-extracted-lite).