Engineering standard

Deploy

Introduction

Deploy in Solution200 defines rules for preparing servers, delivering changes and verifying results. Its purpose is to make each operation clear: what it changes, what it requires and how completion is established.

Server preparation and site deployment

Preparing a node establishes the foundation: administrator access, network rules, directories, server services and their startup after a reboot. Connecting a site adds its code, configuration, database, domain and certificate. These are separate operations with their own checks.

Before a change

  • Identify the target server, environment and exact code version.
  • Check access, the current state and required resources.
  • Keep passwords, keys and operational profiles outside the repository.
  • Prepare a change plan and a way to diagnose an interrupted operation.

Dependencies and the database

Production receives verified code with pinned dependencies. Installation reproduces the lock file; new versions are selected during development. Schema changes belong to the relevant application's migrations and undergo separate verification.

Verify the result

A command completing successfully does not by itself prove that a service is ready. Verification covers the actual service state, availability of required interfaces, application responses and agreement with the expected configuration. After a reboot, checks apply to the new system boot.

Stopping and retrying

If it is unclear whether a change took effect, it is not repeated blindly. First, read the state and determine the supported way to continue. Automatic rollback is possible only where the specific operation defines it safely.

Practical use

Server Bootstrap CLI applies these principles to preparing a clean server. Operator documentation describes input files and commands, while the versioned standard defines the shared rules. This page is an editorial overview; it does not replace the full standards corpus.

Scope and environment profile

Server preparation, application delivery and data recovery have different starting states and consequences.

DEP-SCOPE-001Operation boundary

Declare whether the operation prepares a clean server, connects an application, updates an existing application, or restores data. Name the starting state, expected result and explicit exclusions. A prepared server is not a deployed application, and a source checkout is not runtime proof.

How to verify. The plan names its starting state, result and change boundary.

DEP-SCOPE-002Environment profile

Declare the runtime profile: native host services or containers; local development and production are separate environments. Share invariants, not environment-specific paths or assumptions. Do not require Docker merely because a project supplies development Compose files.

How to verify. Native, development-container and production-container profiles are separate.

Illustrative example
operation: application-delivery
runtime_profile: native
application_revision: <reviewed-commit>
data_actions: <explicit-reviewed-list>

This is a check shape, not a captured execution result. Mutating commands require an approved plan; variables are supplied by the operator.

Access and the approved plan

A working access key alone proves neither the selected target nor approval for the intended changes.

DEP-ACCESS-001Target and access trust

Verify target identity, independent SSH trust, selected account and allowed privilege boundary before mutation. Retain a verified recovery path for access/network changes. Refuse a mismatched target or unknown host key. Never bypass trust checks for convenience.

How to verify. A wrong target or unknown host key stops the operation before mutation.

DEP-ACCESS-002One approval for the exact plan

An approval binds one reviewed operation sequence and its exact inputs, target and consequences. Obtain it once for that scope; do not repeatedly ask for identical micro-steps. New data loss, scope expansion or changed material inputs require renewed review. Inspect/plan do not authorize apply by themselves.

How to verify. Match actual inputs and actions to the approved plan.

Illustrative example
ssh -o StrictHostKeyChecking=yes -o BatchMode=yes "$DEPLOY_TARGET" id -un

Only after independent host-key verification. An account name does not prove the entire target identity.

Release identity and activation

A release must match reviewed bytes. A branch name does not replace the commit, lock and build artifact.

DEP-REL-001Immutable release identity

Bind deployment to a reviewed immutable application commit or artifact, dependency lock and generated asset identity. Verify the selected remote/ref and fetched bytes against that identity before changing the runtime. Checking the branch name or performing a fast-forward alone is insufficient.

How to verify. Actual commit and lock match the manifest, not only a branch name.

DEP-REL-002Preserve checkout state

Classify tracked, untracked and ignored state before updating an existing checkout. Preserve runtime configuration and other people's work. Refuse unexpected state; do not reset, clean, stash, rebase or force-push it away. Choose application branch roles per project; package release/version policy remains owned by its separate standard.

How to verify. Unexpected local work is preserved and refused, not silently cleaned.

DEP-REL-003Activation and code fallback

Define the activation boundary and code/configuration fallback. A release directory with explicit cutover and a controlled in-place update are both possible; neither automatically provides atomicity or zero downtime. Record application compatibility and affected shared services.

How to verify. The activation point and fallback compatibility are explicit.

Illustrative example
git status --short --branch
git rev-parse --verify HEAD
git rev-parse --verify HEAD^{tree}
sha256sum composer.lock

Compare with the expected immutable identity. These outputs alone do not authorize an update.

Configuration and secrets

Configuration connects code to its environment. Validity, installation and actual effects need separate checks.

DEP-CFG-001Secrets and least privilege

Secrets stay in protected operator/target files or a declared secret service. Do not commit them, pass them in visible command arguments, embed them in images, or print resolved environment/configuration into evidence. Use least-privilege provider credentials appropriate to the actual operation.

How to verify. No secret values appear in Git, process arguments, images or evidence.

DEP-CFG-002Validate before installation

Validate generated configuration, intended target paths, permissions and service actions before installation. Rendering is not install; a successful syntax check is not proof of live listeners, TLS or access policy. Shared resources must have explicit ownership and project isolation.

How to verify. Rendered validity and actual installed state have separate evidence.

Illustrative example
code: reviewed application files
secrets: protected operator or target storage
configuration: rendered, reviewed, then installed

This is a check shape, not a captured execution result. Mutating commands require an approved plan; variables are supplied by the operator.

Dependencies and ready assets

Production receives reviewed dependencies and assets; an unplanned package update is not code delivery.

DEP-DEPS-001Install from the reviewed lock

Install the reviewed committed dependency lock in the application when dependencies must change or be repaired. For Composer, use the intended production development-dependency policy and validate actual platform requirements. Do not perform an unconstrained production dependency update as a routine deploy. A demonstrably unchanged installed graph need not be needlessly reinstalled.

How to verify. Install follows the approved lock and actual platform requirements pass.

DEP-DEPS-002Avoid routine vendor copies

Vendor-directory copies are not the normal delivery mechanism. Use the package manager's reproducible install. If a broken installation needs bounded repair, classify and preserve application-specific source/runtime state; do not turn a recovery procedure into an unconditional vendor backup/removal.

How to verify. Routine delivery neither accumulates vendor copies nor removes application-owned code.

DEP-DEPS-003Assets and script effects

Deliver versioned frontend assets or a reviewed build artifact. Record toolchain/build inputs where applicable and check asset manifests and resolution. Separate dependency scripts, cache preparation and application/data commands; explicitly review their effects instead of treating every script as safe.

How to verify. Manifest assets resolve and script effects are reviewed before execution.

Illustrative example
composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction --no-scripts
composer check-platform-reqs --no-dev

This install changes dependencies. Configure environment and access first, and review scripts separately.

Runtime permissions and cleanup

Delivery must leave the runtime able to work and must not accumulate temporary copies.

DEP-FS-001Writable runtime ownership

Declare code owner, runtime identity and writable directories. CLI, FPM and background processes must have the required access without world writable permissions. Source updates and permission normalization must preserve runtime write access, including cache/log/session directories and required ACLs.

How to verify. Check required runtime identities retain write access before and after update.

DEP-FS-002Scope cache preparation

Clear/warm the intended cache under its permitted identity and environment. A targeted stale-cache workaround is not permission to remove all runtime data. Do not delete sessions, queues, task state or another application's cache as an incidental part of deployment.

How to verify. Cache clear/warmup excludes sessions, queues and other applications.

DEP-FS-003Clean owned temporary state

After acceptance, remove this operation's temporary clones, staging payloads and obsolete owned generated state using bounded exact paths. Stop its own leftover sessions/processes. Keep required receipts and recovery references; do not remove other work or accumulate vendor/stale-cache copies.

How to verify. Record removed owned paths and retained receipts/recovery references.

Illustrative example
test -w var/cache
test -w var/log
php bin/console cache:warmup --env=prod --no-debug

Run as the required runtime identity. CLI access does not replace FPM or worker verification.

Schema, data and content filling

Successful code delivery can still damage data. Migrations and content filling therefore need their own scope.

DEP-DATA-001One shared-schema owner

One management application owns a shared schema. Reading frontends do not independently run migrations or create competing schemas. An empty-database baseline and updating a data-bearing database are different operations with different admission and recovery requirements.

How to verify. The management application owns migrations and populated databases use their own path.

DEP-DATA-002Plan data changes explicitly

The plan lists exact approved migrations, imports, grants and content initialization. Check the actual schema, compatibility, available recovery and partial-failure behavior. Do not hide dumps, resets, destructive SQL or migration-history changes inside routine application updates.

How to verify. Each data action is listed with compatibility and partial-failure recovery.

DEP-DATA-003Do not blindly replay content filling

Run content filling only for selected reviewed steps with known manual-edit and replay behavior. A command name such as fill:db is not evidence that every registered step is safe or that repeated execution changes nothing. Do not automatically replay historical initialization on a live database.

How to verify. Review selected steps, manual-edit preservation and actual replay outcomes.

Illustrative example
schema_owner: <management-application>
current_schema: <observed-version>
approved_data_actions: <exact-list>
partial_failure_recovery: <reviewed-method>

This is a check shape, not a captured execution result. Mutating commands require an approved plan; variables are supplied by the operator.

Workers, timers and task state

A background process may retain old code; active or queued does not mean completed work.

DEP-JOB-001Declare expected process state

Inventory which processes should be active, disabled or absent before deployment. Preserve intentional inactivity. Stop/reload/restart only reviewed workers/timers, and account for shared process managers.

How to verify. Intentionally disabled workers remain disabled after delivery.

DEP-JOB-002Verify the new worker code

Confirm the intended new executable/revision and environment in the running worker. Use graceful draining or another reviewed transition for in-flight work. Do not reset leases, cursors, namespaces, deduplication or durable checkpoints just to make an update start.

How to verify. The running worker uses the intended revision and preserves task state.

DEP-JOB-003Observe completed work

A running service, active timer or enqueued task does not prove successful work. Verify the relevant completed outcome and absence of accidental duplicate scheduling. Bound these checks and distinguish observed from unavailable proof; do not claim an unobserved future scheduled run already passed.

How to verify. Observe the relevant completed outcome, not only active or queued status.

Illustrative example
systemctl is-active "$WORKER_UNIT"
systemctl show "$WORKER_UNIT" --property=MainPID,ActiveState,SubState

PID and active status are partial evidence; verify the new revision and task outcome.

HTTP, access and shared delivery

Check the required path to the reader: host, TLS, access, rendering, assets, search and storage.

DEP-WEB-001Host, TLS and access boundary

Check the canonical host, TLS, intended public/private access and application front controller. Preserve access gates unless opening them is part of the approved plan. A sitemap exception is distinct from opening the entire site.

How to verify. Public, private and sitemap paths enforce their intended access.

DEP-WEB-002HTTP proof is separate from CLI

Verify actual FPM/HTTP behavior separately from CLI platform checks. For multiple languages or device representations, test the changed public paths with ordinary client identities. A valid compiled container or CLI response alone is not proof of the website's rendering and assets.

How to verify. Exercise actual changed HTTP paths for the relevant locales and devices.

DEP-WEB-003Scope CDN, search and storage actions

Scope cache invalidation, search actions and storage permissions to reviewed resources. Include dynamic bucket lifecycle when the application owns it. Verify required search privileges before rebuilding indexes; do not discover a missing destructive privilege after removing the working index. Do not use a successful direct storage request as proof of the complete public delivery path.

How to verify. Check privileges before destructive search actions and test the public delivery path.

Illustrative example
curl --fail --silent --show-error --output /dev/null --write-out '%{http_code}\n' "$PUBLIC_URL"

For an approved public URL. Private paths must retain their own access check.

Availability and recovery

Routine code delivery must not silently become maintenance, a reboot or a full project backup.

DEP-AVAIL-001No automatic maintenance 503

Routine updates do not automatically enable an HTTP503 maintenance switch. Preserve availability through the declared compatible update sequence. A genuinely required interruption is a separate reviewed consequence, not an implicit default or a promise of zero downtime.

How to verify. A routine deploy does not add an application or proxy maintenance503 switch.

DEP-AVAIL-002Explicit reboot and shared reload scope

Reboot and shared service reload/restart effects are explicit. Application deployment does not implicitly authorize host upgrades or reboot. A graceful reload may affect several applications; verify the relevant shared service boundary without expanding the deployment scope to unrelated changes.

How to verify. Service actions declare their shared impact and do not hide a host reboot.

DEP-AVAIL-003Recovery proportional to risk

Routine code-only delivery does not automatically create a full application/database/vendor backup. Define recovery according to the actual data risk. Provider snapshots, exported backups and an application rollback are distinct capabilities. Verify the recovery method the plan actually relies on; do not claim portability or restoration from the mere existence of a provider backup.

How to verify. Verify the recovery method actually relied on; do not label a snapshot a portable export.

Illustrative example
service_actions: <reviewed-list-and-shared-impact>
code_fallback: <compatible-revision>
data_recovery: <verified-method-if-needed>
owned_cleanup_paths: <exact-list>

This is a check shape, not a captured execution result. Mutating commands require an approved plan; variables are supplied by the operator.

Acceptance and handoff

Acceptance must follow the deployed revision and observed result, not merely a successful command invocation.

DEP-VERIFY-001Verify what was deployed

Verify deployed commit/tree or artifact, dependency identity, permissions and actual service/application behavior after activation. Where relevant, check web rendering, assets, search, storage, queues and changed content. Keep unchanged-input evidence valid; repeat a PASS only for a changed actual input or unresolved failure, not unrelated bookkeeping.

How to verify. Match release/runtime to the plan and repeat only affected checks.

DEP-VERIFY-002Unknown state and compatible rollback

Distinguish application-code fallback from database rollback and external side effects. Refuse unknown or partial state, reconcile its actual result and choose a reviewed recovery. Do not blindly repeat a potentially completed mutation or downgrade code across incompatible data changes.

How to verify. Partial/unknown state stops blind retry; recovery accounts for data and external effects.

DEP-VERIFY-003Useful and honest handoff

Record scope, exact before/after identities, actions performed, observed results, unavailable checks and temporary-state cleanup. Keep private operational evidence separate from public examples. Do not present illustrative terminal output, source tests or configuration rendering as a real live result.

How to verify. The handoff distinguishes observed results, unavailable checks and illustrations.

Illustrative example
expected_release: <reviewed-identity>
observed_release: <actual-identity>
http_and_worker_results: <observed-results>
unavailable_checks: <explicit-list>
cleanup: <completed-owned-actions>

This is a check shape, not a captured execution result. Mutating commands require an approved plan; variables are supplied by the operator.

The separate Docker profile

Development Compose helps reproduce an environment but is not an automatic production plan.

DEP-DOCKER-001A separate container profile

Document the role of each Compose service and each persistent volume/network. Local development may share stateful services across application projects with a single clear owner. Production topology, exposure, secrets and recovery require their own plan; development Compose is not production acceptance.

How to verify. Stateful services, volumes and networks have explicit owners; dev is not production proof.

DEP-DOCKER-002Actual image identity

Validate Compose configuration without printing resolved secrets. Record actual image identities and build inputs for a reviewed release, including extensions and package sources. Mutable development family tags do not prove the exact patch version or the reproducibility of an already running image; retain an explicit update policy instead of treating a pin as permanent security assurance.

How to verify. Configuration validation and actual image identity/build inputs are separate evidence.

DEP-DOCKER-003Process, mount and cache after update

Account for UID/GID, bind mounts and separate runtime caches where host and container execution coexist. Container healthchecks, configuration validation and restart do not prove application readiness or adoption of new build/environment bytes. Verify the required recreated process and HTTP path.

How to verify. The recreated process uses intended environment bytes and caches do not conflict.

Illustrative example
COMPOSE_DISABLE_ENV_FILE=1 docker compose --env-file "$COMPOSE_ENV_FILE" config --quiet

Validates configuration without printing values. It does not build the image or prove HTTP readiness.

Nginx and PHP-FPM

From the vhost and PHP pool to the actual application response: public root, socket, identity, resources and safe activation. CLI and FPM checks prove different runtime contexts.

Accepted standard ↗ · Operator guide (Ukrainian) ↗ Open in a new tab.

DEP-FPM-001Declare the application mapping

Record the exact hostname/surface, approved code revision, public root, application root, entrypoint, runtime identity, pool and listener. Require an unambiguous hostname→root→socket→pool→identity mapping. A renderer must not accept arbitrary executable snippets or interpolate unchecked values. Keep installation, existing-state adoption and application updates distinct.

How to verify. Compare the vhost root, fixed script path, socket, pool and actual process identity.

DEP-FPM-002Restrict the public filesystem

Expose only declared public content. Source, configuration, environment files, repository metadata and private mutable state are not web roots. Refuse hidden/private paths, including interactions with static locations, aliases, symlinks and encoded paths. Writable uploads never become executable PHP locations. An object-storage application declares its media delivery owner; a generic vhost does not add frontend image processing or expose originals.

How to verify. Test private paths and upload/PHP combinations against real location precedence.

DEP-FPM-003Limit executable routing

Select only explicit PHP entrypoints independently of arbitrary client paths. Define static misses, internal fallback, query and PATH_INFO semantics. A missing asset must not silently become successful application HTML. Prevent arbitrary PHP execution and source disclosure, including mixed-case extensions and paths under assets/uploads. A generated config is not proof that Nginx location precedence enforces these requirements.

How to verify. Check a dynamic query, missing asset, arbitrary PHP and PATH_INFO; inspect safe response semantics.

DEP-FPM-004Bind FastCGI to the intended runtime

Match each vhost to its exact pool/socket and fixed script-root semantics. Validate imported FastCGI parameters and avoid conflicting duplicate script, root and scheme definitions. Restrict socket access to the required web identity; a Unix socket is not isolation if other applications can use it. Application runtimes have no cross-application code-write, secret-read or mutable-state access. Recheck actual process identities and effective access.

How to verify. Inspect effective socket permissions, included parameters and cross-application denial.

DEP-FPM-005Trust only the declared ingress chain

Specify TLS termination, trusted proxy addresses and forwarded host/scheme/client-address handling together with application host/proxy policy. Do not trust client-supplied forwarding headers without the declared network and trust boundary. Unknown hosts fail closed. Private surfaces retain both authorized and unauthorized behavior at edge and origin; DNS or a certificate alone does not prove access policy or prevent origin bypass.

How to verify. Test unknown hosts, spoofed forwarding headers and authorized/unauthorized edge and origin access.

DEP-FPM-006Verify effective PHP, not only the CLI

Declare the supported PHP version, required application modules, INI/scan paths, production error policy and configuration/secret delivery owner. Verify the running FPM worker separately from CLI/Composer. Clear inherited environment by default and explicitly admit required configuration; do not publish phpinfo, raw environment or credentials as evidence. A minimal bootstrap FPM configuration does not prove application production readiness.

How to verify. Compare CLI and protected FPM metadata without exposing configuration values.

DEP-FPM-007Size the whole runtime and its request budgets

Derive process mode, child limits, recycling, memory and service budgets from the actual application and total host load. Account for shared memory, workers, data services and OS reserve; PHP memory_limit is not a complete RSS cap. Coordinate upload/body/post, request termination and FastCGI timeouts. Do not apply illustrative limits as universal production settings. Long jobs use their separately bounded worker profile.

How to verify. Reconcile measured memory, total concurrency and the full request-timeout chain.

DEP-FPM-008Own writable state and diagnostics

Declare cache/log/temp/session ownership, creation modes, ACLs, cleanup and retention. Keep immutable code and repository metadata protected. Verify effective access across parent directories and ACL masks after delivery. Distinguish deployment reads of tracked source, dependency-install writes, runtime writes and Nginx public-file/socket access. An operator's source read does not require blanket access to repository metadata, secrets or runtime state. Cache preparation uses the intended runtime identity/environment. Do not repair permissions through world-write access, blanket tree ownership changes or unconditional var deletion. Logs require rotation/reopen; file sessions require their own cleanup policy. Cache cleanup does not own queues or durable job state.

How to verify. Check each identity and parent ACL; preserve sessions, queues and durable files during cache cleanup.

DEP-FPM-009Review activation and recovery as explicit operations

Review include closure, file preimages, syntax, listeners and service actions before installation/activation. Test new configurations in an isolated supported environment first. Syntax checks may open logs and require their own appropriate identity. Prepare the required pool/socket before its web route. Record reload/drain and code/OPcache cutover behavior; graceful reload is not proof of atomicity, zero downtime or completed long requests. Preserve availability without an automatic HTTP503 switch. Restore only owned compatible config/code preimages after failure; DB recovery remains separately owned.

How to verify. Validate both configs, prepare the socket and prove new requests use the intended release.

DEP-FPM-010Keep startup and renewal explicit

Define boot ordering, firewall/dependency requirements, socket creation and certificate renewal/reload ownership. Current-boot service activity does not prove startup after reboot, and syntax success does not prove effective unit configuration. Verify actual startup on a separately authorized boot; do not reboot a production host merely to complete an example. Record unavailable startup/renewal evidence as open rather than carrying old PID receipts forward.

How to verify. Record current-boot, enablement, actual postboot and renewal evidence separately.

DEP-FPM-011Accept actual application behavior end to end

Verify dynamic route/query behavior, static bytes/MIME, missing assets, hidden/private files, arbitrary PHP/PATH_INFO, uploads, unknown hosts, private access and cross-pool routing using the deployed profile. Preserve exact traversal requests when testing path normalization. Check actual FPM identities, configuration and new-request behavior after activation. Separate origin from edge observations, configuration readback from effective runtime, and fixture proof from production. Status codes alone do not exclude disclosure; verify safe response semantics without collecting private bodies.

How to verify. Preserve exact negative requests and validate bytes/routing rather than status alone.

Illustrative HTTPS vhost: one PHP entrypoint
# Native HTTPS application example. Replace every example value before use.
# The enclosing nginx http{} owns mime.types, logs, worker identity and TLS policy.
# This is not a Cloudflare origin firewall or an access policy.
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name app.example.invalid;

    ssl_certificate /etc/ssl/example/fullchain.pem;
    ssl_certificate_key /etc/ssl/example/privkey.pem;

    root /srv/example/app/public;
    index index.php;
    client_max_body_size 10m;

    location ~ /\.(?!well-known(?:/|$)) {
        return 404;
    }

    location ~ ^/(?:composer\.(?:json|lock)|symfony\.lock|(?:config|src|vendor|var)(?:/|$)) {
        return 404;
    }

    # Object-storage delivery belongs to its own profile; no local upload execution.
    location ^~ /uploads/ {
        return 404;
    }

    # Missing built assets must not become application HTML responses.
    # Plain prefix: hidden-file and PHP denial regex locations still apply.
    location /build/ {
        try_files $uri =404;
    }

    location / {
        try_files $uri /index.php$is_args$args;
    }

    # Only internal routing may reach this single executable entrypoint.
    location = /index.php {
        internal;
        try_files /index.php =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/index.php;
        fastcgi_param DOCUMENT_ROOT $document_root;
        fastcgi_param HTTP_PROXY "";
        fastcgi_connect_timeout 5s;
        fastcgi_read_timeout 60s;
        fastcgi_pass unix:/run/php/app-example.sock;
    }

    location ~* \.php(?:/|$) {
        return 404;
    }

    # FPM ping/status are operator controls, not public application endpoints.
    location = /_fpm_ping {
        return 404;
    }
}

This is not a target-server configuration. Default vhost, actual certificates, ingress trust and private access have separate owners. Syntax and actual HTTP checks remain required.

Illustrative FPM pool for the same socket
; Illustrative sizing, not a host-wide production recommendation.
[app-example]
user = app-example
group = app-example
listen = /run/php/app-example.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

pm = ondemand
pm.max_children = 2
pm.process_idle_timeout = 10s
pm.max_requests = 300
request_terminate_timeout = 55s

chdir = /srv/example/app
clear_env = yes
env[APP_ENV] = prod
env[APP_DEBUG] = 0
security.limit_extensions = .php
catch_workers_output = yes
decorate_workers_output = no
ping.path = /_fpm_ping

php_admin_flag[display_errors] = off
php_admin_flag[log_errors] = on
php_admin_value[error_log] = /srv/example/app/var/log/php-error.log
php_admin_value[memory_limit] = 128M
php_admin_value[upload_max_filesize] = 8M
php_admin_value[post_max_size] = 10M
php_admin_value[upload_tmp_dir] = /srv/example/app/var/tmp
php_admin_value[session.save_path] = /srv/example/app/var/sessions

Fictional paths and identity. Two children and 128M are illustrative; actual sizing, protected secrets, ACL and FPM verification remain required.

Configuration checks and an exact traversal request
sudo php-fpm8.5 --test
sudo nginx -t

# Preserve the exact traversal path; the hostname is fictional.
curl --path-as-is --silent --show-error --output /dev/null \
    --write-out '%{http_code}\n' 'https://app.example.invalid/../private.txt'

Run only in the approved scope. Syntax checks may open logs. curl performs no reload; status alone does not prove absence of disclosure.

R2 and ready images

The original, ready derivative and public URL belong to different parts of the chain. The admin or worker processes images; the frontend reads ready bytes. Only a trusted processing owner handles a derivative miss.

Accepted standard ↗ · Operator guide (Ukrainian) ↗ Open in a new tab.

DEP-R2-001Declare storage and delivery identities independently

Record the environment, account/jurisdiction, API endpoint, bucket templates, object-key grammar, original/derivative policies, public URL mapping and access posture. Public URL, object key, physical bucket and credential are distinct identities. Separate environments and applications through explicit provider permissions and routing, not merely an object prefix or public hostname. Original publication needs its own policy.

How to verify. Compare the physical bucket/key, public URL mapping and credential boundary.

DEP-R2-002Preserve dynamic namespaces and their time source

Derive dynamic buckets from the declared object identity/time contract rather than the current reader/worker clock. Preserve original and derivative namespace choices, physical cache segments and filename policy. Validate rendered names against the target provider's rules. A package accepting a legacy suffix does not prove that a new R2 bucket may use it. A naming/default change does not migrate, copy, rename or delete existing objects. The accepted shared suffix remains `-thumb`; `_thumb` is retained only for previously owner-approved exact legacy consumers, never as a new default or an exception granted by this profile.

How to verify. Render the original and derivative namespace for a fixed object month and the next required month.

DEP-R2-003Select a provisioning mode with sufficient permissions

Declare whether the application creates missing buckets or consumes pre-provisioned dynamic buckets. For R2, do not claim object permissions allow bucket creation. Runtime auto-creation requires its actual broader privilege; pre-provisioning requires ready current/future namespaces and an application configuration that does not rely on creation. Prefer separating provisioning and object access where supported, but do not claim an unimplemented client split. Do not silently disable an existing dynamic flow during credential cleanup. Account-wide management credentials stay inside a trusted provisioning boundary, outside public/frontend/tenant-controlled runtimes. A non-production runtime must not receive a management credential that can reach production buckets. If an existing adapter cannot preserve that boundary, require a reviewed composition/pre-provisioning or account-isolation change before adoption; describing its current client does not waive the accepted isolation standard.

How to verify. Verify creation mode, actual client privileges and trusted provisioning isolation before replacing keys.

DEP-R2-004Bound credentials and provider capabilities

Grant each actual client only supported operations and bucket/path scope. A reader/frontend must not receive writer/provisioner credentials. Cloudflare management tokens, S3 credentials and Worker bindings have different contracts. R2 requests omit unsupported ACL/grant headers and use the correct account/jurisdiction endpoint and region. Validate every needed conditional, multipart, copy and checksum capability rather than assuming complete S3 parity.

How to verify. Check the selected endpoint, unsupported-header omission and allowed/denied operations in an approved scope.

DEP-R2-005Own the original and validate uploaded bytes

Validate authorization, content type, actual encoding, dimensions, size and object ownership before accepting uploads/imports. Declare original retention and overwrite policy. Use provider-supported conditional writes where create-only behavior is required; do not replace a conflict with unconditional overwrite. A successful upload, database row or generated URL does not prove that every required derivative exists or is publicly authorized.

How to verify. Validate bytes and ownership, then verify create-only conflict and required derivative completion.

DEP-R2-006Keep processing with the declared admin/worker owner

A designated processing owner creates allowed derivatives and records completion/failure/retry state. The public frontend consumes ready delivery URLs/bytes and does not gain local transformation, object-write or bucket-provisioning duties through a resolve route or template helper. Processing binaries, resource limits and worker lifecycle are separately declared dependencies; a prepared storage adapter is not processing readiness.

How to verify. Follow upload → original → approved processor → ready derivative → delivery without frontend writes.

DEP-R2-007Make a miss a bounded trusted handoff

Validate application/host, key grammar and allowed filters before storage or generator dispatch. Resolve only a genuine object miss through the configured trusted processing endpoint. Permission failures, timeouts and provider errors are not absence. Do not let the client choose arbitrary buckets, backend URLs, transformations or forwarded credentials. Bound generation, reread and retry behavior; prevent self-redirects and cross-application delivery. Missing originals and native WebP/derivative-suffix mapping have explicit outcomes.

How to verify. Exercise a real miss, missing original and provider failure separately; reject unknown host/filter/key first.

DEP-R2-008Separate public cache from storage consistency

Cache only authorized successful public image responses under declared URL identity and invalidation policy. Generation redirects, generatable misses, authorization failures and server errors do not inherit image-success TTLs. Verify origin, gateway and CDN rules separately. Private/signed responses retain their private/no-store policy. Strong object consistency does not prove fresh CDN bytes or the disappearance of a cached object after deletion.

How to verify. Compare success/miss/error cache headers and verify storage replacement separately from CDN invalidation.

DEP-R2-009Protect every delivery surface

Choose direct custom-domain delivery, a trusted Worker/gateway or another explicit profile; do not make private buckets public as a side effect. Inventory independent public aliases, including development endpoints, and close access-policy bypasses. A presigned URL is temporary bearer access, not a permanent public asset address or a signed custom-domain URL. Keep signature queries and secrets out of logs/evidence. CORS does not authorize storage access.

How to verify. Inspect independent public aliases and signed/private policy without recording signature queries.

DEP-R2-010Recover ambiguous writes and partial lifecycle work

Preserve known/unknown outcomes and reconcile by bounded independent readback before repeating a mutating operation. Coordinate database, original, derivative, delivery-cache and retry/outbox owners without pretending they are one atomic transaction. Cache cleanup does not own originals or durable job state. Provider deletion, application removal and CDN purge are separate operations; partial completion retains actionable recovery state.

How to verify. Reconcile actual object, database and delivery state before retrying a possibly completed write.

DEP-R2-011Verify transfer and credential transitions explicitly

Before storage migration or rotation, inventory actual consumers, paginated objects and future dynamic buckets. Bind deterministic source/target mapping, counts, chosen whole-object digests and permitted access. Do not treat an arbitrary ETag as a full-file checksum. Verify new access before revoking old access and distinguish IAM propagation from object consistency. A credential rotation does not authorize data relocation or deletion. Retain approved recovery references and remove only exact owned temporary/probe state after acceptance.

How to verify. Check all consumers and future buckets; compare chosen file digests and prove old-key denial after rotation.

DEP-R2-012Accept the actual storage-to-delivery chain

Test the selected profile's existing derivative, allowed miss with an existing original, missing original, next-month provisioning, unauthorized host/filter/key, credential restrictions, conditional-write conflict, replacement, deletion and recovery scenarios in their approved environment. Verify bytes, encoding/MIME and declared dimensions, not only URL/status/HEAD metadata. Separate offline syntax/example checks, package source behavior, direct provider operations and public edge observations. Do not claim native provider acceptance or complete CLI automation from a document, fixture or one public image request.

How to verify. Record each selected scenario and its exact evidence class; leave unexecuted provider lanes unavailable.

Bucket, key, URL and miss flow
original bucket:   example-images-202601
derivative bucket: example-images-202601-thumb
object key:        2026_01/thumb-files/card/1767225600-0001.webp
public URL:        https://images.example.invalid/2026/01/thumb-files/card/1767225600-0001.webp

ready object -> gateway/CDN -> frontend
genuine miss -> trusted admin/worker -> derivative -> bounded reread
403/timeout/provider failure -> explicit failure, not object absence

All identities are fictional. The month comes from the object contract, not the reader clock. This creates nothing and proves neither generation nor IAM acceptance.

Read-only HEAD of one approved object
#!/usr/bin/env bash
# Single-object read-only example. Does not create buckets or download object bodies.
set -euo pipefail

# Choose the endpoint for this exact account and bucket jurisdiction.
example_r2_endpoint='https://<ACCOUNT_ID>.r2.cloudflarestorage.com'
example_r2_profile='example-r2-read'
example_r2_bucket='example-images-202601-thumb'
example_r2_key='2026_01/thumb-files/card/1767225600-0001.webp'

# Replace placeholders and bind bucket/key to the approved object inventory first.
if [[ "$example_r2_endpoint" == *'<'* || "$example_r2_endpoint" == *'>'* ]]; then
    printf '%s\n' 'Replace the account/jurisdiction endpoint before use.' >&2
    exit 2
fi

aws --no-cli-pager \
    --profile "$example_r2_profile" \
    --region auto \
    --endpoint-url "$example_r2_endpoint" \
    s3api head-object \
    --bucket "$example_r2_bucket" \
    --key "$example_r2_key" \
    --query '{ContentType:ContentType,ContentLength:ContentLength}'

ACCOUNT_ID is a placeholder: the script refuses before AWS CLI until it is replaced. The operator configures the reader profile outside Git. HEAD reports metadata; bytes, dimensions and actual delivery need separate proof.

Create-only write into an approved test bucket
aws --no-cli-pager --profile example-r2-write --region auto \
    --endpoint-url "$example_r2_endpoint" s3api put-object \
    --bucket "$example_r2_test_bucket" --key "$example_r2_test_key" \
    --body "$example_r2_test_file" --content-type image/webp \
    --if-none-match '*'

This command mutates storage. Use only a separately approved new test object, validated bytes/MIME/size and a prepared writer profile outside Git. Do not use a production key. A conflict/timeout requires bounded readback, not an unconditional PUT. This example is not executed here.

Workers and scheduler

The timer supplies cadence, the scanner finds work and the consumer hands it to the task owner. Acceptance requires the durable business result, rather than an active process or an empty queue.

Accepted standard ↗ · Operator guide (Ukrainian) ↗ Open in a new tab.

DEP-JOBS-001Inventory the execution graph

Declare each producer, scanner, transport/queue, consumer, task executor and durable result owner. Distinguish continuous consumers, one-pass scanners and one-shot jobs/importers. Record exact code/binary, runtime identity, environment, workdir and activation/startup policy per process. Native server workers and edge/serverless workers have different profiles.

How to verify. Trace cadence through dispatch and consumption to the durable task result owner.

DEP-JOBS-002Admit the runtime before activation

Verify approved code, command/receiver availability, required schema, effective transport namespace, configuration/secret access, required CLI extensions and dependency readiness before start. Keep migrations under their single application owner; do not create transport tables implicitly. Ordering and an active network target are not application dependency health. Limit runtime writes and privileges to declared state and required operations.

How to verify. Prove receiver/schema/dependencies and runtime access before starting the reviewed service.

DEP-JOBS-003Supervise the actual process lifecycle

Run long-lived consumers in the foreground under their process manager. For bounded Messenger consumers, restart clean recycling exits as well as unexpected failures; an explicit operator stop remains stopped. Review restart delay/rate limits, concurrency, memory/CPU and request/task budgets against total host load. CLI/application memory limits are not equivalent to service/cgroup limits. Do not give one-shot tasks an unreviewed endless restart policy.

How to verify. Verify clean recycle, failure restart and an explicit stop as separate manager outcomes.

DEP-JOBS-004Make cadence, timezone and exclusion explicit

Declare cadence, timezone, tolerable delay, missed-run/catch-up policy and non-overlap across every scan entrypoint. A calendar timer supplies activations, not durable replay of every missed tick. A recurring one-shot scanner must return inactive after completion. A cooperating host lock covers only actors using the same stable lock identity; it is not a distributed lock or replacement for database claims/fencing. Report contention truthfully.

How to verify. Check the calendar, same-lock contention and scanner inactivity between completed runs.

DEP-JOBS-005Separate scanning from business completion

Treat successful scan, claim/dispatch, message acknowledgement, child-process start and durable task completion as separate outcomes. Verify the task's own accepted result, such as a published generation/artifact, delivered event or ready derivative. A successful service exit or empty queue alone does not prove that delayed, failed, in-flight or detached work completed.

How to verify. Inspect the durable result and its actual artifact/effect after the scanner and consumer finish.

DEP-JOBS-006Preserve redelivery and ownership boundaries

Declare transport redelivery/visibility, lease/heartbeat, idempotency and fencing requirements at actual effect boundaries. Consumer count may not bound detached execution; capacity must follow the actual task owner. Lost ownership, partial external effects and ambiguous results require reconciliation rather than blind retry. Process-manager restart never supplies exactly-once effects. Do not expose or manually replay internal claim protocols.

How to verify. Exercise redelivery and ownership loss in an approved task fixture without blind external-effect replay.

DEP-JOBS-007Prove graceful stop including children

Review signal support, CLI extensions, manager KillMode and stop timeout against the longest permitted in-flight operation and acknowledge window. Test actual propagation to child processes and ownership-loss recovery. Do not call a forced kill graceful or weaken process ownership to hide hanging children. Stopping a timer does not automatically stop an already active scan or its queued/executing tasks.

How to verify. Observe actual signal/drain and child ownership; distinguish timer stop from active work completion.

DEP-JOBS-008Bind deployment to a verified process transition

Review old/new code, message/schema/child-protocol compatibility before activation. Prepare the intended configuration/cache, then use the chosen bounded stop/drain/restart contract and verify old-process exit and new-release execution. A Messenger cache stop request needs a shared stable backend/namespace; cache replacement can lose the signal before observation. Command success is not process acknowledgement. Do not clear the signaling pool before transition acceptance or insert an automatic HTTP503/reboot/queue purge.

How to verify. Prove the old PID exited and the new process executes the intended release before restoring cadence.

DEP-JOBS-009Keep templates and installation distinct

Reuse the accepted canonical Messenger unit template or an explicitly reviewed equivalent; do not fork target-specific copies into every application. Render values from a bounded reviewed profile, prohibit directive/ section/command injection, resolve all markers and record hashes/diffs. Syntax verification, file installation, daemon reload, enablement and process activation are separate effects. Review hardening against actual reads/writes and children; a parsed unit does not prove compatibility or service readiness.

How to verify. Verify the exact canonical template, resolved diff and manager parse before a separately approved install.

DEP-JOBS-010Observe results without exposing payloads

Inspect process/restart reasons, timer/scanner outcomes, queue age/depth, failed/ambiguous occurrences and last accepted task results separately. Normal bounded recycling may increase restart counters; successful one-shot services may be inactive between activations. Log retention/rotation and capacity have explicit owners. Redact credentials, DSNs, message bodies, claim tokens and sensitive child arguments from shared evidence. Diagnostic commands must not silently retry/remove messages or mutate scheduler state.

How to verify. Read bounded service and result metadata; interpret recycling and inactive oneshots correctly.

DEP-JOBS-011Preserve activation intent and recover owned changes

Keep intentionally disabled workers/timers disabled unless their activation is explicitly part of the operation. Review producer/consumer startup and rollback order, active scans/jobs, previous compatible code/unit and durable state boundaries. Restoring a unit or code tree does not roll back queue/DB/job effects. Startup/boot verification is distinct from current-boot activity; do not reboot production merely to complete documentation evidence.

How to verify. Compare intended active/disabled state before and after a compatible rollback or startup operation.

DEP-JOBS-012Accept the chosen runtime end to end

Bind verification to actual unit/code/template inputs and supported manager/application versions. Separate syntax/calendar/host-lock checks from real manager restart, signal/drain, transport, task completion, failure/recovery, resource and postboot evidence. A representative synthetic task requires an approved test scope. Record unavailable lanes as open. Preserve required receipts and remove only owned fixture files/processes after acceptance.

How to verify. Bind receipts to exact inputs and record syntax, real manager, task result and boot lanes separately.

One-pass scanner with a cooperative lock
# Render from reviewed deployment values. Never install unresolved markers.
[Unit]
Description=@@SERVICE_DESCRIPTION@@
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
User=@@RUNTIME_USER@@
Group=@@RUNTIME_GROUP@@
WorkingDirectory=@@APPLICATION_ROOT@@
Environment=APP_ENV=@@APP_ENV@@ APP_DEBUG=0
ExecStart=/usr/bin/flock --nonblock --conflict-exit-code=75 @@SCAN_LOCK_FILE@@ @@PHP_BINARY@@ bin/console scheduler:scan --env=@@APP_ENV@@ --no-interaction
Restart=no
RemainAfterExit=no
TimeoutStartSec=@@SCAN_TIMEOUT_SECONDS@@
TimeoutStopSec=@@STOP_TIMEOUT_SECONDS@@
KillSignal=SIGTERM
KillMode=control-group
StandardOutput=journal
StandardError=journal
SyslogIdentifier=@@SYSLOG_IDENTIFIER@@
UMask=0027
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=@@APPLICATION_VAR_ROOT@@ @@SCAN_LOCK_DIRECTORY@@

This is a template, not an installed service. Resolve every marker from reviewed values. The operator prepares the stable lock path; exit75 means contention. A host lock does not replace distributed claims/fencing.

The timer supplies cadence, not the business result
# This timer supplies cadence; durable task catch-up belongs to the scheduler.
[Unit]
Description=@@TIMER_DESCRIPTION@@

[Timer]
OnCalendar=@@SCAN_CALENDAR@@
AccuracySec=@@ACCURACY_SECONDS@@
RandomizedDelaySec=0
Persistent=true
Unit=@@SCAN_SERVICE_NAME@@

[Install]
WantedBy=timers.target

For example, SCAN_CALENDAR may be *-*-* *:*:00 UTC. Persistent=true does not replay every missed tick. An active scanner is not duplicated; stopping the timer does not finish an active scan.

Bounded manager-state diagnostics
systemctl show example-worker.service \
    --property=ActiveState --property=SubState --property=MainPID \
    --property=Result --property=NRestarts
systemctl show example-scan.service \
    --property=ActiveState --property=Result --property=ExecMainStatus
systemctl list-timers --all example-scan.timer

Names are fictional; these commands only read selected metadata. Active, restart count and a successful scan do not prove the durable task result. Verify the actual release, task outcome and bounded logs without payloads separately.

The canonical reusable Messenger worker template
# Generic Symfony Messenger worker unit template.
#
# Replace every @@PLACEHOLDER@@ from approved deployment configuration, render
# to a review artifact, validate it, and obtain apply approval before installing
# or activating it. Rendering this file is not installation authorization.

[Unit]
Description=@@SERVICE_DESCRIPTION@@
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=@@RUNTIME_USER@@
Group=@@RUNTIME_GROUP@@
WorkingDirectory=@@APPLICATION_ROOT@@
ExecStart=@@PHP_BINARY@@ bin/console messenger:consume @@RECEIVERS@@ --env=@@APP_ENV@@ --time-limit=@@TIME_LIMIT_SECONDS@@ --memory-limit=@@MEMORY_LIMIT@@ --no-interaction
Restart=always
RestartSec=@@RESTART_DELAY_SECONDS@@
KillSignal=SIGTERM
TimeoutStopSec=@@STOP_TIMEOUT_SECONDS@@
StandardOutput=journal
StandardError=journal
SyslogIdentifier=@@SYSLOG_IDENTIFIER@@

# Review these controls against required application reads and writes. Record
# any target-specific relaxation in the approved deployment plan.
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=read-only

[Install]
WantedBy=multi-user.target

This is the same template from the accepted standard, without a target-specific fork. Resolve every placeholder. Restart=always covers bounded clean recycling; explicit systemctl stop stays stopped. Time, memory, hardening and children require actual application-profile checks; rendering does not install the service.

MySQL, Redis and Elasticsearch

One migration authority owns the shared schema. Each service has its own roles and state classes; defaults, stored data and actual application connection settings are verified independently.

Accepted standard ↗ · Operator guide (Ukrainian) ↗ Open in a new tab.

DEP-DATA-SVC-001Inventory data authority and access

Declare each service, version/profile, endpoint/TLS, namespace, role, state class and authoritative/reproducible data boundary. Map consumers to fixed credentials and scopes independent of client input. Protect secrets and runtime configuration; do not publish values, raw data or resolved DSNs. Different services and state classes require their own verification.

How to verify. Inventory each consumer, fixed service identity and authoritative versus rebuildable state.

DEP-DATA-SVC-002Admit least privilege before lifecycle operations

Separate runtime readers/writers, workers, migrators, index lifecycle, backup/restore and observation identities according to actual operations. Verify supported privileges and allowed/denied behavior in an approved isolated scope. Do not add broad rights because a diagnostic or rebuild fails; distinguish authorization failure from service/data failure.

How to verify. Check each operation under its intended role, including denied lifecycle actions in an isolated scope.

DEP-DATA-SVC-003Keep one MySQL migration authority

Bind schema lifecycle to one owning application and reviewed operation. Keep DDL out of public/runtime/worker roles and disable implicit transport schema creation in production. Verify actual schema/version and metadata before migration; partial application mappings are not authority to drop unrelated tables. Empty baselines and populated-environment upgrades remain distinct under their accepted standard. Admin, Frontend and API may share the same physical database/schema with separate runtime roles; separate credentials or metadata visibility do not imply separate schemas. Non-authority applications must retain the accepted technical removal of migration and schema-mutation console commands, not merely avoid calling them.

How to verify. Prove the shared schema identity and one migration owner; non-owner mutation commands must be absent.

DEP-DATA-SVC-004Preserve the selected comparison contract

Verify server/database/table/column defaults and actual technical-field representations separately. Follow the accepted collation conversion standard for collision, uniqueness, FK and partial-DDL recovery. Historical defaults do not override current accepted policy, and changing a default does not convert existing columns. Verify client/connection/results character sets and session collation through each actual application connection, including new and reopened connections and the relevant CLI/FPM/worker contexts. Table options or a standalone operator client do not prove runtime sessions. Configure connection initialization through its owning driver/configuration boundary; test literal case/accent/padding semantics without an explicit COLLATE that masks the effective default. Preserve separately owned ASCII/binary or other technical representations. Conversion is a separately reviewed data operation, never an incidental service setup or documentation correction; a session-only fix does not authorize table conversion or global server-setting changes.

How to verify. Check actual column definitions and new/reopened application sessions; preserve technical fields unchanged.

DEP-DATA-SVC-005Make MySQL grant scope explicit

Read the actual partial-revokes mode before interpreting database grant patterns. Escape wildcard characters where required for an exact schema; quoting alone is not a literal-scope guarantee. Record the real power of grants, including database deletion under database-level DROP. Verify effective scope and do not change a global privilege interpretation setting as a local grant repair or use unrestricted privileges as a default.

How to verify. Read partial_revokes and test the exact database scope; document the destructive power of DROP.

DEP-DATA-SVC-006Classify Redis state before choosing policy

Distinguish disposable cache, sessions, rate limits, locks, queues and durable workflow/checkpoints. Domain read-only runtimes may require bounded Redis writes. Do not infer Redis queue use from an installed instance or apply cache eviction/recovery assumptions to durable state. Separate profiles or instances when state classes require incompatible policies.

How to verify. Classify cache/session/lock/queue/checkpoint data before selecting eviction and restore behavior.

DEP-DATA-SVC-007Bound Redis commands and namespaces together

Verify actual client commands, key/channel patterns, transactions/scripts and allowed/denied behavior. Logical databases or key prefixes alone do not prove isolation; keyless/global commands need explicit denial. Runtime deployment does not grant FLUSH, configuration, ACL/module or service administration. Test dangerous denial cases only where a failed policy cannot damage production. Keep password hashes and credentials protected.

How to verify. Test permitted own-key operations and cross-namespace/global denial on a disposable instance.

DEP-DATA-SVC-008Budget Redis durability and memory independently

Declare eviction, persistence, acceptable loss and restore semantics. Persistence does not prevent eviction; noeviction can refuse writes. Include buffers, fork/copy-on-write and service overhead in resource budgets rather than equating maxmemory with RSS. Verify persistence completion and restore through a supported consistent boundary; do not call arbitrary live AOF/RDB copies a coherent backup or assume zero-loss from an enabled setting.

How to verify. Check actual eviction/persistence policy, memory overhead and a separately approved consistent restore.

DEP-DATA-SVC-009Separate Elasticsearch observation and mutation

Scope search readers, projection writers and index lifecycle operations to declared index/alias identities. Document delete-document versus delete-index and exact create/alias privileges. Cluster health observation has its own cluster privilege; index permissions alone do not supply it. A denied probe is unavailable evidence, while green cluster health does not prove application alias selection or projection freshness.

How to verify. Identify the health observer separately and prove the application reads the intended index/alias.

DEP-DATA-SVC-010Review Elasticsearch rebuild and cutover

Bind mappings/settings, source point, candidate physical index/alias, populate/replay, representative queries and recovery before rebuild. An atomic alias metadata change is not atomicity of source writes and the whole population process. Preserve compatible rollback/retention references until acceptance; do not wildcard-delete or wipe data paths as a smoke check. Size heap/native memory, disk and temporary old/new index coexistence explicitly.

How to verify. Verify candidate queries, source catch-up and rollback references before alias cutover or deletion.

DEP-DATA-SVC-011Preserve state across delivery and recovery

Coordinate authoritative data, durable queues/leases/outbox, search projections and application releases under a reviewed recovery/cutover point. File/code rollback does not roll back data or external effects. Routine deploy does not flush service state, reset schemas or discard jobs. Rebuildable search documents do not imply that security/system/feature state is recoverable without its own contract.

How to verify. List durable and derived state owners and preserve them across the reviewed release transition.

DEP-DATA-SVC-012Accept each actual service boundary

Verify configured and effective service version/profile, scope, schema/state, application critical paths and relevant recovery behavior. Separate package installation, selected metadata/config readback, native fixtures and authenticated application/runtime evidence. Native Elasticsearch backup uses its supported snapshot workflow; filesystem/provider data-path copies are not substitutes. Record unavailable lanes and exact inputs rather than declaring global readiness from a status, PING, count or generated configuration.

How to verify. Collect per-service application proof and mark untested restore/provider paths explicitly unavailable.

MySQL: metadata, actual session and literals
-- Metadata only. Select the exact approved application schema before execution.
-- No CREATE/ALTER/GRANT/FLUSH or application rows are read by this example.
SELECT VERSION() AS server_version,
       @@partial_revokes AS partial_revokes,
       @@character_set_server AS server_charset,
       @@collation_server AS server_collation;

-- These are this operator connection's values, not proof of application sessions.
SELECT @@SESSION.character_set_client AS client_charset,
       @@SESSION.character_set_connection AS connection_charset,
       @@SESSION.character_set_results AS results_charset,
       @@SESSION.collation_connection AS session_collation;

-- UTF-8 file; no explicit COLLATE: observe the effective literal comparison.
-- Expected for utf8mb4_0900_as_ci: accent_equal=0, case_equal=1, padding_equal=0.
SELECT 'e' = 'é' AS accent_equal,
       'A' = 'a' AS case_equal,
       'a' = 'a ' AS padding_equal;

SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME
FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'example_app';

SELECT TABLE_NAME, ENGINE, TABLE_COLLATION
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'example_app' AND TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_NAME;

-- Includes generated technical fields; review exceptions before any conversion.
-- Metadata visibility depends on privileges; a partial inventory is not complete proof.
SELECT TABLE_NAME, COLUMN_NAME, COLUMN_TYPE, CHARACTER_SET_NAME, COLLATION_NAME,
       IS_NULLABLE, EXTRA
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'example_app' AND CHARACTER_SET_NAME IS NOT NULL
ORDER BY TABLE_NAME, ORDINAL_POSITION;

This SELECT example reports the executing client session. Application FPM/CLI/worker connections, new/reopen and metadata visibility need separate checks. Expected accent/case/padding for utf8mb4_0900_as_ci is 0/1/0; this is not captured stdout. Technical ASCII/binary fields are not converted automatically.

Redis ACL for an illustrative string cache
user example-cache reset on #@@PASSWORD_SHA256@@ ~example:cache:* resetchannels +ping +get +set +del +unlink +exists +expire +pexpire +ttl +pttl

Substitute PASSWORD_SHA256 only in a protected target artifact. This is a minimal GET/SET/TTL profile, not a complete Symfony cache/session/queue ACL. A key prefix does not constrain keyless/global commands. Dangerous denial probes belong only on a disposable instance.

Elasticsearch alias reader without cluster privileges
{
  "cluster": [],
  "indices": [
    {
      "names": ["example-search"],
      "privileges": ["read", "view_index_metadata"],
      "allow_restricted_indices": false
    }
  ],
  "applications": [],
  "run_as": [],
  "metadata": {
    "description": "Illustrative alias reader; no cluster-health or index lifecycle rights"
  }
}

This JSON neither creates a user nor installs policy. An empty cluster grant does not permit cluster-health observation. Document delete, delete_index, creation and alias cutover need different privileges; actual search/projection acceptance remains separate.

An exact schema grant with partial_revokes=OFF
-- Mutating example. The schema and existing account are fictional.
-- This escaped database pattern is only for partial_revokes=OFF.
GRANT SELECT ON `example\_app`.* TO 'example_reader'@'localhost';

Read actual @@partial_revokes first; backticks do not remove wildcard semantics. With ON, choose the appropriate literal form without this escaping. This is mutating SQL, not routine deployment. Database-level DROP can remove the database itself; allowed/denied tests belong only in an approved isolated scope.

Data and provider recovery

Start with what was lost and which state must be recovered. A provider-panel backup may be the selected mechanism, but its existence alone proves neither portability nor a successful restore.

Accepted standard ↗ · Operator guide (Ukrainian) ↗ Open in a new tab.

DEP-REC-001Define the recovery objective and authority

Identify failure domain, affected environment/data, authorized operator, required recovery point and acceptable loss/time objectives. Bind the artifact, target, intended writes, stop conditions and postconditions before restore. Inspection/preparation does not authorize recovery actions.

How to verify. Bind the incident, recovery point, exact target, write scope and stop conditions before restore.

DEP-REC-002Distinguish provider backup from portable recovery

Record the chosen provider mechanism's actual coverage, retention, availability, order/account dependency and supported restore target. Do not claim downloadability, portability or application consistency without evidence. A provider-bound backup may be the selected mechanism; extra exports and remote automation are separate decisions, not implicit task requirements.

How to verify. Check what the chosen provider actually restores and whether access survives order/account expiry.

DEP-REC-003Use supported consistent service boundaries

Select native logical/snapshot or explicitly supported provider methods per service and state class. Coordinate authoritative source points and declare crash/application consistency limitations. MySQL transaction/binlog, Redis persistence and Elasticsearch snapshots have different semantics; live file copies do not establish a coherent cross-service backup. Follow supported Elasticsearch snapshot/restore rather than data-directory copying.

How to verify. Record each engine’s supported backup boundary and the actual shared recovery point or consistency limit.

DEP-REC-004Separate authoritative and derived recovery

Preserve authoritative data and original objects under their own lifecycle. Declare which cache/search/derivative data may be rebuilt, with exact source, mapping/configuration, code and replay contract. Account for security/system/feature state and durable queue/lease/outbox state independently. Reproducible application documents do not make every service state disposable.

How to verify. List authoritative originals/data, rebuild sources and independent durable/security state.

DEP-REC-005Prove artifact integrity and protect recovery secrets

Record source identity, recovery point, version/tool inputs, completion, chosen integrity checks and storage/retention scope without committing payloads or secrets. File mtime or successful upload is not completion/restore proof. Verify encryption together with independent recovery-key availability; re-issue compromised/rotatable credentials according to the incident contract. Copies within one failure domain do not prove protection against its loss.

How to verify. Verify provenance, completion, integrity and independent key availability without publishing payloads.

DEP-REC-006Rehearse in an isolated restore target

Restore only into the approved target after proving isolation from production traffic, credentials and external effects. Control automatic worker/timer activation from restored configuration. Verify compatible engines, code/schema and artifact provenance before writes. A rehearsal demonstrates only its tested scope; unavailable full-platform lanes remain explicit.

How to verify. Prove isolated networking/credentials and stopped producers/consumers before any restore write.

DEP-REC-007Reconcile effects before cutover

After data restore, reconcile pending/in-flight jobs, ownership, idempotency and external effects before replaying work. Restore/rebuild derived state and verify semantic application integrity and critical paths before approved traffic/producer/consumer cutover. Partial/unknown outcomes require readback and reconciliation, not automatic destructive retry or data overwrite.

How to verify. Reconcile job/effect ownership and verify application semantics before restoring traffic and cadence.

DEP-REC-008Keep routine deployment and retention scoped

Routine code deployment does not automatically create a full backup. Data-impacting operations require a suitable reviewed recovery reference and plan. Preserve incident evidence and required recovery artifacts; remove only exact owned fixtures/temporary state after acceptance under their retention policy. A code/config fallback is not a database restore, queue purge or authority to delete another operator's backups.

How to verify. Keep recovery proportional to data risk and clean only explicitly owned temporary resources.

Illustrative recovery map
failure_domain: <declared incident scope>
recovery_point: <accepted source point>
artifact: <provenance and chosen integrity digest>
restore_target: <approved isolated target>
producer_and_consumer_state: stopped until accepted cutover
service_boundaries:
  mysql: <supported consistent data boundary>
  redis_durable: <native persistence and effect reconciliation>
  elasticsearch: <supported snapshot or reviewed projection rebuild>
  originals: <inventory and bytes verification>
provider_backup:
  mechanism: <selected provider service>
  order_dependency: <verified contract or unavailable>
  portability: <verified capability or unavailable>
acceptance: <semantic application and durable-result checks>

This is a plan shape, not an executed backup/restore. A provider-bound copy is not called a downloadable image without evidence. Code/config fallback does not roll back data or external effects; replay and traffic cutover have their own scope.

The principles in practice

Author’s article

From manual commands to a CLI: planning, approving and verifying server changes

article.solution200.com

How to separate planning, applying and verifying server changes.

Read the article — opens in a new tab

Author’s article

The complete CLI wizard: prepared Debian, a private site and verification after reboot

article.solution200.com

What establishes server readiness and what a specific site still needs.

Read the article — opens in a new tab