ninkik can be hosted on different HTTP ports, usually during development, or behind an HTTP(S) proxy.
Based upon the settings, all URLs are internal rewritten to direct the client to the correct and expected services.
ninkik consists of a number of services which can be individually deployed.
Service | Subdomain | Default port for HTTP | Maven module | Description |
---|---|---|---|---|
api | api | 8080 | ninkik-api | API endpoint |
asset | asset | 8081 | ninkik-ui-asset | Shared assets like images, stylesheets etc. |
download | download | 8082 | ninkik-ui-download | Provide binaries through redirection or instructions |
customer | my | 8083 | ninkik-ui-customer | Customer profile with subscribed products |
tenant | * (everything else) | 8084 | ninkik-ui-tenant | Tenant profile |
homepage | www | 80 | none | Homepage |
You can change each service port by applying -Dserver.port=${newPort}
. If you do local development and have changed a service port, you have to change also the port in each of the services by configuring them with -Dhosting.${serviceName}.port=${newPort}
.
Setting | Description | Default |
---|---|---|
hosting.tld | top-level domain of ninkik instance, e.g. ninkik.com | localhost |
hosting.port | front-facing proxy port, e.g. 443 or 80 | 80 |
hosting.scheme | protocol to use, e.g. http or https | http |
hosting.enableHttps | Automatically set hosting.port=443 and hosting.schema=https |
false |
hosting.enableSubdomains | Put all services under the default subdomain | false |
hosting.subdomainPrefix | Automatically apply this subdomain prefix to appliable services, e.g. beta- | none |
For local development, each of the services can be independently started. No further configuration is required.
None of the services handles internally HTTPS but requires a front-facing HTTPS proxy like nginx or Amazon ELB or ALB.
Start each of the services above with the following parameters:
-Dhosting.enableHttps=true \
-Dhosting.enableSubdomains=true
If you want to internally or publicly deploy a ninkik beta-testing environment, you can do it so by using
-Dhosting.enableHttps=true \
-Dhosting.enableSubdomains=true \
-Dhosting.subdomainPrefix='beta-'
The endpoints can now reached via beta-api.${your-tld}
and so on.