Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. In openlmis-ref-distro's compose file, comment requisition service section (so the reference distribution will start without it).
2. Add network_mode: "host" parameter to nginx container in openlmis-ref-distro compose file.
OR add to requisition service docker-compose.yml fle
networks:
 default:
  external:
   name: openlmis-ref-distro_default

3. Run openlmis-ref-distro as normal.
4. Enter openlmis-requisition's folder, and edit your settings.env file to have it's BASE_URL and CONSUL_HOST values the same as in openlmis-ref-distro.
5. You may need to remove log and db services plus links to them from the docker.compose.yml of the service you want to debug, so it only starts the image with actual OpenLMIS service (in this case openlmis-requisition)
6. Run service as usual with docker-compose run --service-ports requisition.
67. Run npm install.
78. Run gradle consulRegistration.
89. Run gradle bootRun --debug-jvm
910. Attach debugger in your IDE.

* You may possibly approach some problems with installing npm dependencies - if running step 7 or step 8 causes an error (such as Cannot find module 'command-line-args'), please copy all references from consul/package.json to package.json at root (or go to the consul folder) and re-run npm install.