You can also start JHipster Registry from the provided Docker image. The application that we generated already has the docker-compose file required.
For example, in the gateway application we created, look for the docker-compose file under src/main/docker/jhipster-registry.yml.
We can start the JHipster Registry by typing the following command in the terminal:
> cd gateway
> docker-compose -f src/main/docker/jhipster-registry.yml up
The docker compose file (src/main/docker/jhipster-registry.yml) contains:
version: 2
services:
jhipster-registry:
image: jhipster/jhipster-registry:v3.2.3
volumes:
- ./central-server-config:/central-config
environment:
- SPRING_PROFILES_ACTIVE=dev
- SECURITY_USER_PASSWORD=admin
- JHIPSTER_REGISTRY_PASSWORD=admin
- SPRING_CLOUD_CONFIG_SERVER_NATIVE_SEARCH_LOCATION= file:./central-config
ports:
-8761:8761
This defines the image as jhipster-registry with a version (the latest). It also defines a volume to mount the central-config, which is required by the Spring Cloud Config server to define the application properties for the microservice application and gateway. The environment variables such as the Spring profile, password for the admin, and cloud config search location are also defined here. The port in which it is exposed (8761) is also specified.
In all preceding cases (when they are successful), it boots up JHipster Registry on port 8761 and uses native mode by default (unless otherwise changed explicitly). You can actually navigate to http://localhost:8761 to access JHipster Registry and then log in to the application with the password that we used when we started the application.