Hello Umar,
you don't need to copy the microservice jar-file. Instead you can take advantage of the incremental profile loading by doing the following:
- copy the gateway-prod.yml file and name it gateway-ssl.yml
- delete everything inside the gateway-ssl.yml file except the lines that configure the ssl certificate
- delete the lines that configure the ssl certificate from the gateway-prod.yml file
- in the servicewatcher-sw.yml file copy the entire gateway-section and paste it right below the original one.
- add the profile 'ssl' to the right of the 'prod' profile to the original gateway section and change the name from 'gateway' to 'gateway-ssl'
- at the new gateway section change the name to 'gateway-nossl' and change the port to 80 (or the one you desire).
in the end it should look like this:
- name: gateway-ssl
type: microservice
profiles: prod,ssl,cloud,red
instances: 1
memory: 512M
port: 443
path: ${appBase}/gateway/gateway-app.jar
- name: gateway-nossl
type: microservice
profiles: prod,cloud,red
instances: 1
memory: 512M
port: 80
path: ${appBase}/gateway/gateway-app.jar
the name of the service and of the profile can be chosen freely (just keep 'gateway-' as the start of the profile-filename)
Regards
Nicolai