Docker
On this page
The Docker image runs the whole application (server and portal) on port 8080 as the non-root user appuser (uid 1001). It is based on the ASP.NET Core 10.0 runtime on Ubuntu 24.04 LTS, so the host needs no .NET runtime.
Full guide. Building the image, the run and service scripts for Linux and Windows, all settings and the troubleshooting section are in the operator guide of the WorkSmartHub-Docker-Kubernetes repository (English, Magyar). This page is a summary.
The image#
There is no public registry: the image worksmarthub:<version> is built from the source folders with build/build-image.sh --version <n> (or build-image.ps1), or loaded on the host with docker load -i.
Running it#
With the scripts of the operator repository:
cd docker/linux
sh worksmarthub-run.sh --version 23 --detachcd docker\win
.\worksmarthub-run.ps1 -Version 23 -DetachWithout the scripts, the essential command is:
docker volume create worksmarthub-data
docker run -d --name worksmarthub --restart unless-stopped --stop-timeout 60 \
-p 8080:8080 -e HttpSettings__Urls__0=http://+:8080 \
--mount type=bind,source=/opt/worksmarthub/appsettings.json,target=/app/appsettings.json \
-v worksmarthub-data:/app/data \
worksmarthub:23Then open http://<host>:8080/, upload the licence and create the first user (Getting started).
| Option | Purpose |
|---|---|
-e HttpSettings__Urls__0=http://+:8080 |
Listen on all interfaces on the container port. Required. |
-v worksmarthub-data:/app/data |
The persistent data volume. Without it, data is lost when the container is removed. |
--mount ... appsettings.json |
Your configuration from the host. Environment variables override it (Section__Key, for example ConnectionStrings__InternalDb). |
--stop-timeout 60 |
Lets the application finish its background work (45 s) and close the database. |
--restart unless-stopped |
Restart after a crash and when Docker starts. |
To start at boot, rely on the restart policy with the Docker service enabled, or install the systemd service / Windows scheduled task of the operator repository. The container's clock is UTC, so job times in App Konfiguráció → Háttérfolyamatok are UTC.
What the data volume holds#
| Content | Path in the volume |
|---|---|
| SQLite database | database.db, database.db-wal, database.db-shm (always copy together) |
| Server disk file storage | FileStorage/ |
| Log files | Logs/ |
| Live e-mail and notification templates | LiveEmailTemplates/, LiveNotificationTemplates/ |
appsettings.json is not in the volume; back it up separately. With an external database and a cloud file storage the volume holds only logs and templates.
Before first real use#
Extract appsettings.json from the image, set your own signing keys and PublicBaseUrl, and make the file readable only by administrators and uid 1001 (Configuration). Behind a reverse proxy, the proxy must set X-Forwarded-Host and X-Forwarded-Proto and accept request bodies above 25 MB.
Health check#
GET /health answers 200 {"status":"Healthy"} without sign-in. The image has no HEALTHCHECK and no curl; the operator guide shows a bash-based check for Docker Compose.
Upgrade, backup, restore#
Stop and remove the container, then run the new image with the same volume; migrations run at start. Back up the volume with the application stopped. The commands are on Upgrading, backup and restore.