Skip to content

What is a Service?

A service is an application container that Hostly runs and makes reachable through a public domain.

Typical services are:

  • websites
  • web applications
  • HTTP APIs
  • personal tools
  • dashboards
  • other applications reachable through HTTP or HTTPS

Relationship to the workspace

A service always belongs to exactly one workspace.

The workspace determines in particular:

  • the domain area of the service
  • the assigned plan
  • the available features
  • the resource budget
  • the members and permissions under which the service is managed

A service is created by a deployment

In Hostly, a service exists only after a Docker image has been deployed.

In the user interface, Hostly uses deployment for the process by which Hostly provides an application, and service for the resulting application instance.

This documentation distinguishes, where possible:

  • Service: the managed application,
  • Deployment: providing or replacing that application.

Docker image

A Docker image is a prepared package containing the application and the parts it needs to start.

Hostly currently supports already built Docker images. Hostly does not build an image from source code or from a Git repository.

Docker Hub and alternative registries are supported. For private registries, matching credentials can be stored in the deployment.

Image tags

A fixed tag identifies a published image version:

text
example/my-service:1.4.2

With the popular latest option, Hostly loads the version the tag points to at deployment time. If latest later changes in the registry, the running service is not updated automatically. A restart also does not download the image again. The service deployment must be changed to force an update.

Parts of a service

PartMeaning
Docker imageContains the application.
Service domain fragmentDetermines the service domain within the workspace.
Internal container portPort where the application is reachable inside the container.
Environment variablesNormal configuration values.
SecretsConfidential values in the encrypted secret store.
FilesUploaded files that Hostly mounts into the container.
LogsOutput from stdout and stderr.
SSLEnables HTTPS with an automatic Let's Encrypt certificate.
High availabilityStarts two instances of the same service.
VolumePersistent storage in the Paid Tier.

Public reachability

Each service receives a service domain:

text
<Service-domain-fragment>.<Workspace-domain-fragment>.hostly.ninja

Exactly one internal container port is exposed publicly for a service. Hostly forwards the public HTTP or HTTPS connection to this port.

Example:

text
Internal port: 3000
Public URL: https://app.example.hostly.ninja

The internal port does not need to be specified in the public URL, just like with other websites.

Health check

A container can be running in the cluster even though the application is not reachable through its public domain. This can happen, for example, when the application is not reachable on the configured port.

Hostly therefore uses a health check to verify whether the service is reachable from the internet.

The technical state of a service is therefore not based only on the container status, but on several pieces of information:

text
Service status
+ Health check
+ Logs
+ configured internal port

SSL

SSL is available in the Free Tier and Paid Tier.

When SSL is enabled:

  • Hostly automatically creates a Let's Encrypt certificate
  • no manual certificate configuration is required
  • the service is reachable through HTTPS
  • Hostly automatically redirects HTTP requests to HTTPS

The interface uses the term SSL; technically, TLS is used. Disabling it requires a new deployment, either through "Modify deployment" or by deleting and recreating the service.

High availability

With high availability, Hostly starts two instances of the same service. This allows a second instance to remain available if one instance fails.

High availability is available in both plans. Base compute and RAM usage are roughly doubled as a result.

Multiple versions

A service can be deployed multiple times over time. However, a new deployment always replaces the previous version.

Hostly currently does not provide automatic rollback. To return to an earlier version, its image tag must be deployed again.