Hosting

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.

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}.

Settings

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

How-To

Local development

For local development, each of the services can be independently started. No further configuration is required.

Proxy environments

None of the services handles internally HTTPS but requires a front-facing HTTPS proxy like nginx or Amazon ELB or ALB.

  1. Let your DNS server point the subdomains above to the proxy's IP address. Don't forget to configure the wildcard subdomain.
  2. Based upon the hostname, forward the request to the designated service port.

Production

Start each of the services above with the following parameters:

    -Dhosting.enableHttps=true \
    -Dhosting.enableSubdomains=true

Beta-testing environments

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.