Check before deploy
The Check before deploy panel looks at what you are about to deploy and tells you, in plain words, what might go wrong. It is on the Compose, Git and template deploy forms, just above the Deploy button.
- It is free. It uses no AI and needs no AI key.
- It changes nothing and deploys nothing.
- It never blocks you. You can always click Deploy, whatever it found.
Click Check. Each finding has a level, a sentence that explains it and a Fix: line. If you change the form afterwards, the panel says the result is out of date; click Check again.
What it looks for
| Level | Finding | What it means |
|---|---|---|
| Problem | Privileged mode | privileged: true gives the container full control of the server. The panel refuses it. |
| Problem | Refused by the panel | Anything else the deploy itself refuses, such as host networking, extra capabilities, a host mount or a build: step. The text comes from the same validator the deploy uses. |
| Problem | Licence or plan full | The licence edition's app limit is reached, or the chosen customer's plan has no free place for another app. |
| Warning | No volume | An image that stores data (Postgres, MySQL, MariaDB, MongoDB, Redis, MinIO and similar) has no volume, so its data is lost when the container is recreated. |
| Warning | Secret in plain text | An environment variable whose name looks like a secret (PASSWORD, TOKEN, API_KEY, SECRET …) or a URL with a password is written out in the Compose file. Set it on the app's Environment tab after the deploy instead, where values are stored encrypted. |
| Warning | No fixed version | The image uses :latest or no tag, so a redeploy can install a newer release without you choosing it. |
| Warning | Runs as root | The service sets user: root or user: "0". |
| Note | No health check | The service declares no health check. Unless the image has its own, the panel can see that the container runs but not that the app answers. |
| Note | No port | Nothing declares a container port, so the panel has nowhere to send web traffic. That is fine for a background worker. |
| Note | Host port | A Compose service publishes a host port ("8080:80"). The panel does not open it: the app gets a web address that goes to the container port (80) instead. Nothing to do; expose: says the same without a host port. |
| Note | Branch build | A Git deploy builds a branch as it is at deploy time; every redeploy can pick up new commits. Deploy a release tag for a fixed version. |
Some things are left out on purpose:
- Git deploys. The panel builds the image, so there is nothing to read before the build. Environment values you enter on the Git form are stored encrypted, so they are never reported as plain text, and they are not sent to the check.
- Templates. Catalog templates are checked with the values you entered. Password fields and secret-looking values are replaced by
********in the browser before the check runs. Template fields are not reported as plain-text secrets: the template decides how they are stored.
On the portal deploy page
Customers and resellers find the same panel on Deploy from GitHub (/portal/services/deploy-git for a customer, /github/deploy for a reseller; see Deploy from a reseller or customer account). Pick a repository (and, as a reseller, the customer), then click Check. It is free, changes nothing and never blocks Deploy.
The portal check differs from the operator's in three ways:
- Your own plan. The plan checked is the one of the customer you are signed in for. A reseller checks for one of its own customers only. Nobody can check with another customer's plan, whatever the request says. A template is checked only when your plan offers it.
- Nothing about other customers. When the server's licence is full, the finding says so without telling you how many apps the server runs.
- No AI suggestions yet. Suggest fixes is for operators only: it spends the operator's AI key. It comes to the portal once plans carry their own AI allowance.
Suggest fixes with AI
On the Compose form, a check that found something offers Suggest fixes. The panel's AI proposes a corrected Compose file and shows it as a before/after diff, with the tokens and the estimated cost of the call.
- Apply to the form puts the change into the Compose editor. Nothing is deployed until you click Deploy yourself. Click Check again to see what is left.
- It uses the operator's Panel AI (Settings → AI → AI Providers), the same key and model as the Assistant. Without one, the button explains that none is set up.
- Secret values never go to the AI. Every environment value whose name or value looks secret is replaced by a placeholder before the request. The placeholders are put back in the suggestion, so your form keeps its values.
- The answer is checked before you see it. It must be a Compose file that the panel's own deploy rules accept (no privileged mode and so on), and it must publish no host port: the AI writes
expose:instead. Anything else is discarded with a message. The AI's explanation is shown as plain text. - Every call that reaches the AI is recorded in the panel's AI usage log as an
ai_deploy_suggestentry, with its tokens and cost, even when the answer is discarded. - Monthly limit. By default the panel makes at most 50 suggestions a calendar month (UTC). After that, the button says the limit is reached until the 1st. A platform administrator can change the limit with the setting
ai.deploy_suggest_monthly_limit(0switches suggestions off):
curl -s -X PUT https://panel.example.com/api/v1/settings/ai.deploy_suggest_monthly_limit \
-H "Authorization: Bearer $PANEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"value":"100"}'
Suggestions are not offered for Git and template deploys. The panel builds Git images itself, and templates are already maintained configurations.
For agents and scripts
The same checks are available as POST /api/v1/services/check and as the MCP tool check_deploy. Both call one implementation, so they always agree with the panel. They need the services.deploy permission, the same one a deploy needs, and they are for platform operators only.
curl -s -X POST https://panel.example.com/api/v1/services/check \
-H "Authorization: Bearer $PANEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"image","image":"postgres","port":5432}'
The request names a kind (compose, image, git or template) and the fields of that kind: composeYaml; image and port; gitRepoUrl and gitBranch; or templateId and variables. Add customerId to check that customer's plan limit. The answer lists findings, each with rule, severity (error, warning or info), field, message, fix and params, plus a count per severity. A finding names an environment variable but never contains its value.
POST /api/v1/services/check/suggest takes the same body (compose or image only) and returns before, after, a plain-text summary, findingsAfter (the check run again on the suggestion), usage (provider, model, tokensIn, tokensOut, costUsd, priceSource), and used and limit for the month. Errors: ai_budget_reached (429), panel_ai_not_configured (400), nothing_to_fix (409), ai_output_invalid and ai_provider_error (502). It is not an MCP tool: an MCP client is itself an AI, so it reads check_deploy and edits the spec on its own.
Resellers and customers use POST /api/v1/portal/services/check and the tenant MCP tool check_deploy (see Tenant MCP). Both need services.deploy. The kind is git or template, the kinds a tenant can deploy; compose and image are refused. A template the customer's plan does not offer answers template not found, as an unknown one does. A customer sends no customerId (a request with one is refused with 400): the customer is the one the session belongs to. A reseller must send the customerId of one of its own customers; any other answers 404. The tenant MCP tool takes no customer_id: the key supplies the customer.
curl -s -X POST https://panel.example.com/api/v1/portal/services/check \
-H "Authorization: Bearer $PORTAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"git","gitRepoUrl":"https://github.com/acme/shop","gitBranch":"main","port":8080}'