-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Frequently Asked Questions
- How to install official or custom apps?
- What is the difference between production image and development image?
- How to build assets?
- How to update?
- How to take backups?
- How to install ERPNext on Postgres
- Where to find old Dockerfile(s)?
- How to build arm64 images?
- How to restart bench?
- How to execute bench commands?
- Why do some containers exit?
- SocketIO does not work with pwd.yml
In case of production setup you need to build your custom image for installing apps. This repository only publishes frappe/erpnext image with no additional app. You CANNOT bench get-app
in running containers.
To build image refer documentation to build custom apps. To automate it using CI refer this post.
In case of development setup, you can do bench get-app
as usual.
The bench
image is used for frappe app development. It starts all the required services and a service called frappe
with all the tools required for development. It can be used independently or it integrates well with VS Code devcontainers. Read more for development setup.
The production setup is built with immutable application code. It packages just the dependencies and application code required to run in production. These images cannot be used for development or to change and push app code.
You cannot build assets using bench build
in running production containers. It will mess up the attached assets volume for the container in which the command was executed. It will cause problems in serving static assets. The asset building process is done during the image build. Images come pre-packaged with built assets and there is no need to build assets in production environment.
Change the image tag for all the frappe framework services, take down all the containers and start them again with new images. Once the containers are running you'll need to migrate sites with bench --site all migrate
command. The image and container replacement is done as per the container orchestrator.
As there is no cron schedule running in containers, you will need to setup a cron task manually. Refer documentation for backups
At this moment ERPNext only works with and supports MariaDB.
Check old branches of this git repository. compat
, compat-2022
, version-10
, version-12
Easiest way to build arm64
images is to execute build on arm64
runner. Currently frappe/bench
image is made for amd64
and arm64
. If you wish to build for multi arch, use --platform
flag for buildx command. Refer official docker documentation
ARM64 builds always cause problems with automation, List of PRs and reverts related to ARM64. https://github.com/frappe/frappe_docker/pulls?q=is%3Apr+arm64+is%3Aclosed
Restarting all the containers restarts the bench. Supervisor is not necessary and not available in containers. bench restart
WILL NOT WORK. Restart with orchestrator specific commands.
As a quick fix you can enter into gunicorn
container and execute commands. As a good practice you can start a separate container with sites
volume attached and attached to common network of existing containers and execute the commands. If done from separate container even if any thing changes the app code, it'll only affect the temporary container started to execute commands.
configurator
service from pwd.yml
or compose.yaml
and create-site
service from pwd.yml
will exit with status code 0 after completion. They are only executed once and closed. Reference in documentation.
For socketio to work host header must match site name. Code
In case of localhost setup make following changes to pwd.yml
:
- Set environment variable
FRAPPE_SITE_NAME_HEADER
underfrontend
service to$$host
. - Change site name from
frontend
tofrontend.localhost
undercreate-site
service command. Any name appended by.localhost
can be chosen. - Add
frontend.localhost:host-gateway
inextra_hosts
underwebsocket
service. Note choose appropriate site name that was created and set above.
In case of production setup make following changes to pwd.yml
:
- Set environment variable
FRAPPE_SITE_NAME_HEADER
underfrontend
service to$$host
. - Change site name from
frontend
toerp.example.com
undercreate-site
service command. Any domain name that resolves to the server IP can be used here.