dd_id_d6f2fe4e8e
4. System Technical
Deployment
Table of Contents
Overview
- Development happens locally.
- Local files are the source of truth.
- Git is for user review only; Codex must not commit or push.
- Deployment is done via direct copy (rsync), not git.
- The local
server/directory must mirror the live server layout, except for explicit blacklist exclusions (caches, builds, etc.).
Paths
- Server app root:
/var/www - Local app root:
server/var_www/
Typical Flow
Flow
1. Make changes locally. 2. Deploy via rsync: python scripts_local/deploy_to_server.py. 3. Rebuild and restart services (Docker Compose) if needed.
Deployment via Rsync (Required)
Rsync
- Do not use git for deployment.
- Use rsync to copy the repository into
/var/www. - Command:
python scripts_local/deploy_to_server.py. - The deploy script respects
.gitignore-style exclusions. - Excluded paths are not deleted on the server (e.g.,
vendor/,node_modules/, caches). - If rsync is unavailable locally, the deploy script falls back to a tar + scp copy of the working tree (respects
.gitignore, overwrites files but does not delete extras). - The deploy script removes
/var/www/.gitto enforce non-git deployments. - Codex must not commit or push; git usage is reserved for the user.
- Local rsync path (Windows):
C:msys64usrbinrsync.exe. - Do not deploy by copying the entire tree and then deleting unwanted files.
- Prefer targeted
scpuploads of only the required server files and folders. - Always exclude local-only items at deploy time (see "Remove from server (local-only)").
Notes
- Avoid syncing runtime caches or build artifacts (covered by
.gitignore). - Use one-shot containers for tests when needed.
- Run containers from the server with:
docker compose -f /var/www/docker-compose.yml up -d. - WordPress docs publish/sync:
python3 scripts_local/publish_devdocs.py. - FE dependencies are installed via the FE container entrypoint if
vendor/is missing. - FE Composer installs run with
--no-scriptsto avoid cache:clear during image builds. - Server-side changes are overwritten by rsync; do not edit production files on the server.
- Server contents are case-by-case, not "devdocs only".
- Keep on server (required):
docker-compose.yml,docker/,symfony_fe/,symfony_be/,devdocs_wp/,scripts_server/,freshness/,config.xml. - Keep on server (only if used by server workflows):
tests/(server test runner),vendor//node_modules/(runtime deps when containers need them). - Blacklist (do not deploy / keep off server, or exclude from mirroring):
- Reasoning: avoid leaking local-only metadata, keep the server clean, prevent cache/build churn, and ensure the live server reflects the curated runtime layout rather than developer artifacts. Keep these locally for (a) data retention in case the server breaks down and (b) easier local overview than browsing the server.
scripts_local/codex_work_queue/.idea/- old/info.mdtemp.mdtodo.md/var/www/.gitignore/var/www/.gitnode_modules/vendor/devdocs/static build output when WordPress is the active docs system (no longer used)