Conversation
fix: use `frappe_site_name` for asset resolution instead of `host`
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <[email protected]>
- Implement native supervisor.conf generation using a Jinja2 template - Remove reliance on `bench setup supervisor` command execution in Docker - Add `is_running` check for admin tools to prevent unnecessary restarts during bench startup Signed-off-by: aloksingh <[email protected]>
- Remove explicit check for `benchname` existence at start command - Eliminate `typer.BadParameter` error for undefined bench name - The `benchname` is expected to be valid by this point in the execution flow Signed-off-by: aloksingh <[email protected]>
- Remove explicit check for `benchname` existence at start command - Eliminate `typer.BadParameter` error for undefined bench name - The `benchname` is expected to be valid by this point in the execution flow Signed-off-by: aloksingh <[email protected]>
Fix supervisor config generation and nginx config during alias update
…/setup-python-6 build(deps): bump actions/setup-python from 5 to 6
…/checkout-6 build(deps): bump actions/checkout from 4 to 6
build(deps): bump cryptography from 46.0.3 to 46.0.5
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 15: Workflow does not contain permissions
Potential fix for code scanning alert no. 5: Workflow does not contain permissions
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
- Add `exec-command.sh` wrapper for `docker-compose run` commands - Remove direct `--user` and `--entrypoint` flags from `run` commands - Centralize UID remapping and environment setup via the new wrapper - Include `exec-command.sh` in the Frappe Docker image
- Replace direct command execution using `bash -c` with a new `exec-command.sh` wrapper script. - Remove the explicit `user` and `entrypoint` arguments from all `compose.run` calls. - This change centralizes the logic for running commands as the correct user within the container's entrypoint, simplifying the Python code. - Apply this pattern consistently across the `0.19.0` migration script and the `BenchAppManager` and `BenchSiteManager` modules. Signed-off-by: aloksingh <[email protected]>
- Remove the `images-tag.json` file to use the package version from `pyproject.toml` as the single source of truth. - Update CI workflows and the local `build.sh` script to dynamically read the package version and construct the image tag. - Convert `docker-compose.tmpl` files into Jinja2 templates, allowing image tags to be rendered at runtime based on the installed `frappe-manager` version. - Add a new `get_docker_image_tag` helper function to centralize the logic for creating versioned tags (e.g., `v0.19.0`). Signed-off-by: aloksingh <[email protected]>
- Update the project version from `0.19.0` to `0.19.0.dev0`. Signed-off-by: aloksingh <[email protected]>
- Remove the recursive `chown` on the `/opt` directory within the `configure_workspace` shell function to significantly improve container startup times. - Update the timing log message to reflect the duration of the entire function rather than just the removed `chown` command. - Remove the '❌' emoji from git validation error messages for a cleaner CLI output. Signed-off-by: aloksingh <[email protected]>
- Normalize the target version to its base version (e.g., `0.19.0.dev0` becomes `0.19.0`) before comparison. - This ensures that migrations intended for a final release are correctly included when upgrading to a development or pre-release version. - Fixes an issue where migrations were being skipped because pre-release versions are considered older than their final release counterparts according to PEP 440. Signed-off-by: aloksingh <[email protected]>
- Update the migration version string from `0.19.0` to `0.19.0.dev0`. - This change marks the beginning of the development cycle for the upcoming release. Signed-off-by: aloksingh <[email protected]>
- Replace the hardcoded "v0.19.0" version string with a dynamic call to `self.version.version_string()`. - Update Docker image tag replacements, user-facing output messages, and log entries to use the dynamic version. - Adjust docstrings and comments to refer to the "current version" instead of a specific one, improving code maintainability. Signed-off-by: aloksingh <[email protected]>
- Replace the hardcoded 'v0.18.0' string replacement with a more robust regular expression. - The migration script can now update Frappe Manager images from any previous version tag, not just a specific one. - Improve logging to display the transition from the old version to the new version for better clarity during migration. Signed-off-by: aloksingh <[email protected]>
- Introduce `exec-entrypoint.sh`, a new lightweight script for executing one-off commands via `docker-compose run`. - This script only handles UID/GID mapping, skipping the full supervisor and workspace setup to significantly speed up command execution. - Update `shell`, migration, and other bench commands to use this new entrypoint, resulting in faster operations. - The new script is now included in the `frappe` Docker image. Signed-off-by: aloksingh <[email protected]>
- The `exec-command.sh` wrapper script, which was an unnecessary layer of indirection, has been removed from the project. - The `Dockerfile` is updated to no longer copy the script into the container image. - All command execution logic in Python files (e.g., shell, migrations, site/app management) is updated to call shells like `/bin/bash` directly instead of using the wrapper script. Signed-off-by: aloksingh <[email protected]>
- Remove the slow `usermod` operation that previously ran on every container start to match the host user's UID/GID.
- Pass the numeric `${USERID}:${USERGROUP}` directly to `gosu`, which executes the command as the correct user instantly without needing a corresponding `/etc/passwd` entry.
- This change drastically reduces container startup time from over 15 seconds to milliseconds.
- Set the `HOME` environment variable to `/workspace` to ensure a correct home directory, as `gosu` with a numeric UID would otherwise default to `/`.
Signed-off-by: aloksingh <[email protected]>
- Use `gosu ... env` to explicitly pass all required environment variables to the final command. - This fixes a potential issue where `gosu` might not reliably inherit the environment from the parent shell, making the setup more robust. - Key variables for `fnm`, `uv`, `PATH`, `HOME`, and locale are now explicitly set for the non-root user process. Signed-off-by: aloksingh <[email protected]>
- Append a timestamp to the backed-up virtual environment directory (e.g., `env.bak-YYYYMMDD_HHMMSS`). - Prevent the previous `env.bak` directory from being overwritten each time the venv is recreated. - Allow for multiple historical backups of the `env` directory to be retained.
- Pass `USER=frappe` and `GROUP=frappe` environment variables to the `gosu` execution environment. - This ensures these variables are available to subsequent processes, as `gosu` can reset the environment. - Fixes potential issues with tools or scripts that rely on the `USER` or `GROUP` environment variables being set. Signed-off-by: aloksingh <[email protected]>
- Enhance `depends` command to show merge status, review count, and local merge - Provide a summary of Dependabot PRs (ready, failing, behind, merged) - Integrate PR approval directly into the `depends-merge` recipe - Remove redundant `depends-status` and `depends-approve` recipes Signed-off-by: aloksingh <[email protected]>
- Switch build backend from setuptools to hatchling - Update project version to 1.1.0 and minimum Python requirement to 3.9 - Configure `uv` to manage `typer-examples` Git dependency Signed-off-by: aloksingh <[email protected]>
- Bump project version from `1.1.0` to `1.2.0` - Upgrade core dependencies to newer versions, including `typer`, `rich`, and `redis` - Remove Python 3.8 from supported classifiers - Update `nuitka` dev dependency to `4.1.0` Signed-off-by: aloksingh <[email protected]>
Update dependencies and enhance Dependabot management features
- Switch Dependabot Python ecosystem from `pip` to `uv` - Add Dependabot updates for `/Docker/frappe/fmx` directory using `uv` - Remove `tool.poetry.urls` section from `pyproject.toml` Signed-off-by: aloksingh <[email protected]>
- Increase minimum Python version requirement to 3.10. - Remove Python 3.9 classifier from `pyproject.toml`. - Introduce `uv.lock` for deterministic dependency management. Signed-off-by: aloksingh <[email protected]>
chore: Configure Dependabot and update project metadata
Bumps [packaging](https://github.com/pypa/packaging) from 26.1 to 26.2. - [Release notes](https://github.com/pypa/packaging/releases) - [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst) - [Commits](pypa/packaging@26.1...26.2) --- updated-dependencies: - dependency-name: packaging dependency-version: '26.2' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.13.3 to 2.13.4. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](pydantic/pydantic@v2.13.3...v2.13.4) --- updated-dependencies: - dependency-name: pydantic dependency-version: 2.13.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [requests](https://github.com/psf/requests) from 2.33.1 to 2.34.2. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.33.1...v2.34.2) --- updated-dependencies: - dependency-name: requests dependency-version: 2.34.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.3 to 9.1.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@9.0.3...9.1.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.1.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.7 to 49.0.0. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@46.0.7...49.0.0) --- updated-dependencies: - dependency-name: cryptography dependency-version: 49.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Update dependencies: packaging, pydantic, requests, pytest, cryptography
Xieyt
marked this pull request as ready for review
July 1, 2026 10:55
- Import `re` module to enable regular expression operations. - Remove `client_max_body_size` directive from `default.conf` during migration. - Prevent Nginx from encountering duplicate directive errors when `upload-limit.conf` is active. - Backup `default.conf` before writing cleaned content. Signed-off-by: aloksingh <[email protected]>
- Introduce `FM_STOP_CONTAINERS` environment variable for the migration test script - Make stopping Frappe Manager containers conditional based on `FM_STOP_CONTAINERS` value - Document the new `FM_STOP_CONTAINERS` variable in the script's comments Signed-off-by: aloksingh <[email protected]>
- Back up `nginx/conf/conf.d/default.conf` if it exists in the bench config. - Ensure `nginx default.conf` can be restored after it's modified during migration. - Update the `_backup_for_rollback` docstring to reflect the new backup item. Signed-off-by: aloksingh <[email protected]>
Fix Nginx duplicate directive error and add container stop option
- Remove `--skip-failing` flag from the default `bench migrate` command - Update docstrings and help messages for the `--migrate` and `--migrate-command` options - Ensure default `bench migrate` command now fails if any migration step encounters an error Signed-off-by: aloksingh <[email protected]>
- Remove the `.dev0` development suffix from `__version__` - Set the official application version to `0.19.0` Signed-off-by: aloksingh <[email protected]>
- Use `frappe_manager.__about__.__version__` for `get_current_fm_version` - Remove `importlib.metadata.version` for package version lookup - Add `--reinstall` flag to `pip install` in `migrate-test.sh` script - Ensure a clean installation of the package during migration tests Signed-off-by: aloksingh <[email protected]>
- Add `--refresh` flag to the pip install command - Ensure fresh package metadata is always considered during installation - Improve reliability of dependency installation within the test script Signed-off-by: aloksingh <[email protected]>
Refactor migration process and update versioning strategy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This major release spans the full stack: updates to the in-container
fmxutility, replacement ofcertbotwithacme.shfor SSL, replacement ofpyenv/nvmwithuv/fnmfor Python/Node runtime management, Docker performance improvements, a completely reworked FM migration system, and an overhauled documentation site.Migration window: v0.18.0 minimum - v0.19.0 only migrates from v0.18.0+. Users on older versions must upgrade to v0.18.0 first.
Runtime:
pyenv/nvm→uv/fnm- Old runtime directories are cleaned up during migration. Python versions are now managed byuvand stored per-bench at.uv/python/. Node versions are managed byfnmand stored per-bench at.fnm/.SSL:
certbot→acme.sh- All certificate operations now useacme.sh. No email required for Let's Encrypt. ThecertbotCLI dependency is removed entirely.[ssl]config →[[ssl_certificates]]array - The old single[ssl]table is migrated to an array of[[ssl_certificates]]entries, supporting multiple certs per bench.preferred_challengeis renamed tochallenge_type; credentials move to[dns_providers.cloudflare].fm ssl delete→fm ssl remove- Thedeletesubcommand is renamed.--frappe-branchremoved - Use--apps frappe:version-16instead.--ssl,--letsencrypt-email,--letsencrypt-preferred-challengeremoved fromcreate/update- SSL is now managed post-creation viafm ssl add.--sync-configflag removed - Configuration sync is handled automatically.Docker images updated to v0.19.0 - Global nginx-proxy updated from
jwilder/nginx-proxy:1.6to1.11.nginx
SITENAMEenv var →SITE_MAPPINGS- Now a JSON mapping ({"sitename": "sitename"}) instead of a plain string.Removed: Redis Queue Dashboard from admin tools;
DisplayManagermodule from the host CLI (inlined intoRichOutputHandler).What's New
fmx- In-Container Utility (Updated)fmx(originallyfm-helper) is the existing in-container CLI that manages bench processes from within the Frappe Docker image. v0.19.0 upgrades it to Python 3.10, migrates its build system to Hatchling, locks dependencies, and ships several RQ fixes.v0.19.0 changes to fmx:
uv.lock)pyproject.toml)Commands (for reference):
fmx status [services...]fmx start [services...]fmx stop [services...]--drain-workers,--worker-kill-timeout,--skip-stale-workers)fmx restart [services...]fmx rq suspendrq:suspendedflag - workers stop dequeuing new jobsfmx rq resumefmx rq status [-v]How it works:
/fm-sockets/*.sock)ThreadPoolExecutorSIGUSR1to worker processes for graceful job completionSPAWN_ERRORand connection failuresbench-wrapper.sh: interceptsbench restart/status/stop→ delegates tofmx; wrapsbench workerwith aSIGUSR1trap for graceful shutdown; barebenchwith no args shows fmx helper commandsZero-Downtime Frappe App Deployment (
fmx restart --migrate)fmx restart --migrateis a standalone production deployment tool inside the container. It is completely independent offm migrate(FM infrastructure migration). Use it whenever you update a Frappe app and need to run Frappe's own database migrations (bench migrate) without dropping in-flight jobs or taking the site down hard.Flow (
fmx restart --migrate):--maintenance-mode)rq:suspendedflag--worker-kill-timeout,--skip-stale-workers)bench migrate(Frappe app DB schema migrations - not FM)Relevant flags:
--migratebench migratebefore restarting--migrate-commandbench --site mysite migrate)--drain-workers--migrate)--worker-kill-timeout--skip-stale-workers--maintenance-modemaintenance_mode=1incommon_site_config.jsonduring the flowSSL Management Overhaul
New
fm sslsubcommand tree:fm ssl add <bench> <domain>fm ssl add --standalone <domain>fm ssl remove <bench> <domain>fm ssl list [bench]/--all/--standalonefm ssl renew [bench] [domain]--dry-run,--force,--all,--standalonefm ssl acme-sh <args>acme.shfor advanced operationsfm ssl dns-configChallenge types:
--challenge http01): Webroot via nginx-proxy. Requires domain to resolve to the server.--challenge dns01): Cloudflare API. Supports--cnamefor CNAME delegation.Standalone mode (
--standalone): Manages SSL for any Docker project using FM's nginx-proxy via thefm-global-frontend-network. Configurations stored inexternal_domains.toml.Other:
FM_LETSENCRYPT_STAGING=1--skip-dns-check,--wait-for-dns)CLI / UX Improvements
New global flags:
--non-interactive/-n--log-level debug|info|warning|errorfm create- new flags:--python3.11)--node20)--restart--alias-domains--github-token/-t--newrelic/--no-newrelicfm update- new flags:--python--node--add-alias--remove-alias--upload-limit500M)--restart--newrelic/--no-newrelicfm restart- new flags:--nginx--container--supervisor--forcefm migrate- new command:--all-benches--auto-proceed--rerun--on-failure prompt|archive|rollback--skip-all-backup--skip-backup-for <bench>--exclude-bench <bench>--all-benchesrunfm shell- new flags:-c/--command--bench-consoleOther:
--helpviatyper-examplesfm infonow shows Python and Node versionsfm self compose- debug compose configurationfm services shell- shell into global service containersArchitecture & Configuration
frappe_manager/commands/{ssl,self,services}/module structureget_global_output_handler/set_global_output_handlerwithLoggingOutputHandlerwrapperapp_manager,certificate_manager,docker_ops,supervisor,ssl,orchestratorsub-objectsBenchOrchestrator, auto-streaming,os.execvpfor directdocker composeexecution (removes subprocess overhead)fm_{name}_{token_hex(8)})frappe_manager/__about__.pyhatchlingbuild systemFM Migration System (Infrastructure Upgrade)
Two-tier architecture:
fminvocation (except whitelisted commands:list,self compose,self update-images,migrate); user is prompted to update inlinefm migrate <benchname>What
fm migratedoes per-bench (all performed outside the container via Docker Compose and config file edits):[ssl]→[[ssl_certificates]], rename fields, move DNS creds, addalias_domains/upload_limit/restart_policy/use_uvSITENAME→SITE_MAPPINGS, add restart policiesclient_max_body_sizeacross vhostd,site_config.json, nginx custom configdocker compose up --force-recreatecommon_site_config.json, and per-sitesite_config.jsonbefore any changefm migrateflags:--all-benches--auto-proceed--rerun--on-failure prompt|archive|rollback--skip-all-backup--skip-backup-for <bench>--exclude-bench <bench>--all-benchesrunDocker & Performance
exec-entrypoint.sh: lightweight entrypoint for one-off commands - skips full init, uses numericgosuUID/GID to eliminate the ~16susermod/groupmoddelay/optchown - was a major slow path on every startup.uv/.fnmrelocated tofrappe-bench/(per-bench isolation, cleaner home dir)base(Ubuntu 22.04 + system deps + wkhtmltopdf) →tooling(fnm, uv, fmx) →frappe(final)v*tag pushDocumentation Overhaul
fmx.md,ssl.md,backup-restore.md,environments.md,python-node-versions.md,upload-limits.md,admin-tools.md,app-management.md,external-database.mdscripts/update_cli_docs.pytyper-examplesTests Added
--rerun,--on-failureflags)fmxworker kill parameter testsconftest.pyBug Fixes
ctx.objassignments (services,fm_config_manager, Docker daemon check, migration checks, image pulling) guarded behindhelp_calledcheck - fixes crashes on--helpexport_to_tomlraises on write failure instead of silently returningFalseFRAPPE_MANAGER_HOMEtreated as unsetcurlcalls now have timeouts; validates HTTP 200 before usePYTHONUNBUFFERED=1, UTF-8 fallback)LiveAwareRichHandlerwrapsRichHandlerto prevent log output colliding with Rich Live displaysUpgrading from v0.18.0
Full changelog
See
docs/changelog.mdfor the complete commit history.Compare: v0.18.0...v0.19.0