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:
example/my-service:1.4.2With 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
| Part | Meaning |
|---|---|
| Docker image | Contains the application. |
| Service domain fragment | Determines the service domain within the workspace. |
| Internal container port | Port where the application is reachable inside the container. |
| Environment variables | Normal configuration values. |
| Secrets | Confidential values in the encrypted secret store. |
| Files | Uploaded files that Hostly mounts into the container. |
| Logs | Output from stdout and stderr. |
| SSL | Enables HTTPS with an automatic Let's Encrypt certificate. |
| High availability | Starts two instances of the same service. |
| Volume | Persistent storage in the Paid Tier. |
Public reachability
Each service receives a service domain:
<Service-domain-fragment>.<Workspace-domain-fragment>.hostly.ninjaExactly one internal container port is exposed publicly for a service. Hostly forwards the public HTTP or HTTPS connection to this port.
Example:
Internal port: 3000
Public URL: https://app.example.hostly.ninjaThe 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:
Service status
+ Health check
+ Logs
+ configured internal portSSL
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.
