Skip to content

Frequently Asked Questions

Revant Nandgaonkar edited this page Oct 31, 2023 · 8 revisions

Frequently Asked Questions

How to install official or custom apps?

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.

back to FAQ

What is the difference between production image and development image?

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.

back to FAQ

How to build assets?

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.

back to FAQ

How to update?

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.

back to FAQ

How to take backups?

As there is no cron schedule running in containers, you will need to setup a cron task manually. Refer documentation for backups

back to FAQ

How to install ERPNext on Postgres?

At this moment ERPNext only works with and supports MariaDB.

back to FAQ

Where to find old Dockerfile(s)?

Check old branches of this git repository. compat, compat-2022, version-10, version-12

back to FAQ

How to build arm64 images?

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

back to FAQ

How to restart bench?

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.

back to FAQ

How to execute bench 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.

back to FAQ

Why do some containers exit?

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.

back to FAQ

SocketIO does not work with pwd.yml

For socketio to work host header must match site name. Code

In case of localhost setup make following changes to pwd.yml:

  1. Set environment variable FRAPPE_SITE_NAME_HEADER under frontend service to $$host.
  2. Change site name from frontend to frontend.localhost under create-site service command. Any name appended by .localhost can be chosen.
  3. Add frontend.localhost:host-gateway in extra_hosts under websocket service. Note choose appropriate site name that was created and set above.

In case of production setup make following changes to pwd.yml:

  1. Set environment variable FRAPPE_SITE_NAME_HEADER under frontend service to $$host.
  2. Change site name from frontend to erp.example.com under create-site service command. Any domain name that resolves to the server IP can be used here.

back to FAQ