frappe-data-migration-generator
Generate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.
frappe-containerfile-generator
Generate Containerfile for Frappe apps using the official frappe/erpnext images with Gunicorn. The recommended pattern copies app source into the bench layout and runs Gunicorn directly.
Full skill instructions
Generate Containerfiles for Frappe applications using the official docker.io/frappe/erpnext base images.
IMPORTANT: Frappe apps are NOT normal Python apps. They run inside the Frappe bench directory structure (/home/frappe/frappe-bench) and require specific directory layout, user permissions, and the Gunicorn entry point frappe.app:application.
Use this skill when:
This is the standard pattern for all Frappe apps. Replace <app-name> with the actual app name (snake_case, matching the app's Python package name).
FROM docker.io/frappe/erpnext:version-15
USER root
WORKDIR /home/frappe/frappe-bench
# Create asset directory and fix permissions
RUN mkdir -p sites/assets/<app-name> && \
chown -R frappe:frappe sites/assets
USER frappe
WORKDIR /home/frappe/frappe-bench
# Copy application files
COPY --chown=frappe:frappe . ./apps/<app-name>/
# Install app, register in apps.txt, verify asset directory
RUN env/bin/python3 -m pip install -e ./apps/<app-name> && \
export BENCH_DEVELOPER=1 && \
ls -1 ./apps > sites/apps.txt && \
ls -l /home/frappe/frappe-bench/sites/assets/<app-name> && \
cat sites/apps.txt
CMD [ \
"/home/frappe/frappe-bench/env/bin/gunicorn", \
"--chdir=/home/frappe/frappe-bench/sites", \
"--bind=0.0.0.0:8000", \
"--threads=4", \
"--workers=2", \
"--worker-class=gthread", \
"--worker-tmp-dir=/dev/shm", \
"--timeout=120", \
"--preload", \
"frappe.app:application" \
]
invoicingFROM docker.io/frappe/erpnext:version-15
USER root
WORKDIR /home/frappe/frappe-bench
RUN mkdir -p sites/assets/invoicing && \
chown -R frappe:frappe sites/assets
USER frappe
WORKDIR /home/frappe/frappe-bench
COPY --chown=frappe:frappe . ./apps/invoicing/
RUN env/bin/python3 -m pip install -e ./apps/invoicing && \
export BENCH_DEVELOPER=1 && \
ls -1 ./apps > sites/apps.txt && \
ls -l /home/frappe/frappe-bench/sites/assets/invoicing && \
cat sites/apps.txt
CMD [ \
"/home/frappe/frappe-bench/env/bin/gunicorn", \
"--chdir=/home/frappe/frappe-bench/sites", \
"--bind=0.0.0.0:8000", \
"--threads=4", \
"--workers=2", \
"--worker-class=gthread", \
"--worker-tmp-dir=/dev/shm", \
"--timeout=120", \
"--preload", \
"frappe.app:application" \
]
<app-name> everywhere with the real app slug (snake_case)COPY --chown=frappe:frappe . ./apps/<app-name>/pip install -e ./apps/<app-name>sites/assets/<app-name>Example for qrcode:
RUN mkdir -p sites/assets/qrcode && \
chown -R frappe:frappe sites/assets
COPY --chown=frappe:frappe . ./apps/qrcode/
RUN env/bin/python3 -m pip install -e ./apps/qrcode && \
export BENCH_DEVELOPER=1 && \
ls -1 ./apps > sites/apps.txt && \
ls -l /home/frappe/frappe-bench/sites/assets/qrcode && \
cat sites/apps.txt
Use the version that matches the target Frappe/ERPNext deployment:
| Version | Base image tag | Notes |
|---|---|---|
| 15 | version-15 | Default for new apps — stable, widely deployed |
| 16 | version-16 | Latest, use when targeting v16 sites |
| 14 | version-14 | Legacy, only for existing v14 deployments |
FROM docker.io/frappe/erpnext:version-15
FROM docker.io/frappe/erpnext:version-16
FROM docker.io/frappe/erpnext:version-14
When packaging multiple custom apps into one image:
FROM docker.io/frappe/erpnext:version-15
USER root
WORKDIR /home/frappe/frappe-bench
RUN mkdir -p sites/assets/app_one sites/assets/app_two && \
chown -R frappe:frappe sites/assets
USER frappe
WORKDIR /home/frappe/frappe-bench
COPY --chown=frappe:frappe ./app_one ./apps/app_one/
COPY --chown=frappe:frappe ./app_two ./apps/app_two/
RUN env/bin/python3 -m pip install -e ./apps/app_one && \
env/bin/python3 -m pip install -e ./apps/app_two && \
export BENCH_DEVELOPER=1 && \
ls -1 ./apps > sites/apps.txt && \
cat sites/apps.txt
CMD [ \
"/home/frappe/frappe-bench/env/bin/gunicorn", \
"--chdir=/home/frappe/frappe-bench/sites", \
"--bind=0.0.0.0:8000", \
"--threads=4", \
"--workers=2", \
"--worker-class=gthread", \
"--worker-tmp-dir=/dev/shm", \
"--timeout=120", \
"--preload", \
"frappe.app:application" \
]
docker.io/frappe/erpnext:version-{VER} — NEVER use generic UBI, Python, or Debian images/home/frappe/frappe-bench/apps/<app-name>/sites/assets/<app-name> and chown to frappe:frapperoot for mkdir/chown, switch to frappe before COPY and RUNsites/apps.txt after installing the app (ls -1 ./apps > sites/apps.txt)env/bin/python3 -m pip install -e (the bench virtualenv)frappe.app:application — NOT flask run, NOT bench start0.0.0.0:8000 (Frappe's standard port)--chown=frappe:frappepodman build -t my-frappe-app .
podman run -p 8000:8000 my-frappe-app
--chown=frappe:frappe when copying fileslatestWhen generating a new app, automatically include:
Containerfile using the template aboveContainerfile in the app root directoryversion-15 unless user specifies a versionGenerate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.
Generate API documentation, user guides, and technical documentation for Frappe apps. Use when documenting APIs, creating user guides, or generating OpenAPI specs.
Enforce the Iron Law of TDD for Frappe apps. Red-Green-Refactor cycle for DocTypes and Controllers.
Generate Frappe-style DocType controllers with lifecycle methods for microservices.
Canonical folder structure produced by `bench new-app` for modern Frappe (v14/v15+). Use this as the ground truth for any Frappe app file tree — includes pyproject.toml and module management.
Generate whitelisted API methods and REST endpoints for standard Frappe and microservices.
Validate code follows frappe-microservice-lib patterns, security best practices, and framework conventions.
Generate tenant-isolated database queries using TenantAwareDB to prevent cross-tenant access.
Generate secure, tenant-aware API endpoints with authentication and tenant isolation.
Generate Frappe Web Forms for public-facing forms. Use when creating customer portals, registration forms, surveys, or public data collection forms.
Generate comprehensive unit tests for Frappe DocTypes, controllers, and API methods. Use when creating test files, writing test cases, or setting up test infrastructure for Frappe/ERPNext applications.
Generate integration tests for multi-DocType workflows and distributed services in Frappe.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience