Advanced settings
Reference for the advanced settings in Settings: run commands, Swarm, build server, resources, mounts, redirects, auth, ports and Traefik.
These settings are for complex setups and debugging. Run command, cluster settings, Swarm settings and resources are in Settings › Resources. The build server is in Settings › Source and build. Volumes and mounts are in Settings › Storage. Redirects, security, ports and Traefik are in Settings › Networking. Wrong values can break the application, and Swarm settings can disrupt orchestration, so change them deliberately. Click Redeploy after changing cluster settings or resources.
Run command
In Settings › Resources, runs a shell command in the container once the app is built and running. Enter it and click Save. Useful for debugging and admin tasks.
Cluster settings
| Setting | What it does |
|---|---|
| Replicas | Number of instances of the application |
| Registry | Registry that images are pulled from |
Swarm settings
Click Swarm settings in the Cluster settings card. Each setting takes JSON, as in the zero-downtime example.
| Setting | Fields |
|---|---|
| Health check | Test command, interval, timeout, start period, retries |
| Restart policy | Condition, delay, max attempts, window |
| Update config | Parallelism, delay, failure action, monitor, max failure ratio, order |
| Rollback config | Parallelism, delay, FailureAction, monitor, MaxFailureRatio, order |
| Placement | Constraints (rules a node must meet), preferences (spread load across nodes) |
| Mode | Replicated with Replicas; Global (one per node); ReplicatedJob with MaxConcurrent and TotalCompletions |
| Network | Target (network name), Aliases, DriverOpts such as MTU size and host binding |
| Labels | Key-value metadata, for example com.example.app.name = my-app |
Build server
In Settings › Source and build, build on an external server, push to a registry, and have deployment servers pull the image. Use it to keep deployment servers small, build once and deploy to many, or isolate builds from production.
- wtree Cloud connects to the build server over SSH, clones the repository and builds the image.
- It pushes the image to your registry.
- Deployment servers pull the image and deploy it.
A build server needs a registry reachable from your deployment servers. It works for applications only, not Compose. Setup is in Build server.
Resources
wtree Cloud passes these values straight to the Docker API, so enter raw numbers without units.
| Setting | Unit | Examples |
|---|---|---|
| Memory limit | Bytes. The container is killed above it. | 268435456 = 256 MB, 536870912 = 512 MB, 1073741824 = 1 GB, 2147483648 = 2 GB |
| Memory reservation | Bytes. Guaranteed minimum. | 134217728 = 128 MB, 268435456 = 256 MB, 536870912 = 512 MB |
| CPU limit | nanoCPUs. Hard limit. 1000000000 = 1 core. | 500000000 = 0.5, 1000000000 = 1, 2000000000 = 2, 4000000000 = 4 |
| CPU reservation | nanoCPUs. Guaranteed minimum. | 250000000 = 0.25, 500000000 = 0.5, 1000000000 = 1 |
Keep each reservation at or below its limit. A memory reservation above the limit is capped to the limit, and a CPU reservation that is too high can stop the container from starting.
Units are not parsed. 1024m is read as 1024 bytes and 1.5 CPUs as 1 nanoCPU. Both are below Docker's minimums (about 6 MB, 0.001 CPU) and the deployment fails with a generic Swarm error.
wtree Cloud sends them in the service spec under TaskTemplate.Resources:
{
"TaskTemplate": {
"Resources": {
"Limits": { "NanoCPUs": 2000000000, "MemoryBytes": 1073741824 },
"Reservations": { "NanoCPUs": 1000000000, "MemoryBytes": 536870912 }
}
}
}See the Docker Engine API for the full schema.
Volumes and mounts
In Settings › Storage, keep data across restarts and deployments.
| Type | Fields | Use it for |
|---|---|---|
| Bind mount | Host path, Mount path (in the container) | Host files or directories, such as configs |
| Volume mount | Volume name, Mount path (in the container) | Docker-managed volumes, easier to back up and move |
| File mount | Content, File path, Mount path (in the container) | A single config file |
For a file mount, the mount path must include the file name.
wtree Cloud creates a file mount once, stores it in a files folder in the project directory, and keeps it across deployments. If your app writes to the file, the editor reads the current file from the server (over SSH for remote servers), so you see those changes. If the file is missing or unreadable, the editor shows the content stored in wtree Cloud.
If the file changes on the server after you open the editor, saving is refused so your edit doesn't overwrite it. Reopen the editor and edit again.
Redirects
In Settings › Networking, click Add redirect.
| Field | What it does |
|---|---|
| Regex | Matches the URLs to redirect |
| Replacement | Target URL |
| Permanent | Sends HTTP 301 instead of a temporary redirect |
To send http://localhost traffic to http://mydomain, use Regex http://localhost/(.*) and Replacement http://mydomain/$1.
Security
In Settings › Networking, click Add security and set a Username and Password to put basic authentication in front of the app.
Ports
In Settings › Networking, use the Ports card.
| Field | What it does |
|---|---|
| Published port | Port on the host that routes to the app |
| Target port | Port the app listens on in the container |
| Protocol | TCP or UDP |
Published ports are for reaching the app at your-ip:port, not through a domain. Avoid ports already used on the host to prevent bind errors. For domains, see Domains.
Traefik
In Settings › Networking, edit Traefik rules for routing, load balancing and TLS for this application. See Web server.
