Frappe Framework app development using docker
Quick Instructions for Starting Frappe Framework App Development using docker
Quick Instructions for Starting Frappe Framework App Development using Docker
Introduction:
What is Frappe Framework
Frappe Framework is an open-source web framework for building business applications. It provides a powerful and flexible platform for developers to build custom applications for businesses of all sizes. With the rise of containerization and the need for streamlined and efficient application deployment, the use of Docker for Frappe Framework app development has become increasingly popular.
What is Docker
Docker is a containerization platform that allows developers to package their applications and dependencies into containers. This provides a lightweight and portable way of deploying and running applications on any machine. Containers are isolated from each other, which helps to prevent any conflicts between different applications and their dependencies. This makes Docker an ideal platform for deploying Frappe Framework applications.
Using Docker for Frappe Framework App Development
The process of using Docker for Frappe Framework app development is straightforward.
- Developers on their Windows 10/11 system should first install WSL2 system.
- Developers then should install the latest version of Docker
- Download and install latest version of VS Code
- Login to WSL2 system based Linux distribution say Ubuntu
- Inside install git and create a frappe_docker directory
- run below commands
git clone https://github.com/frappe/frappe_docker.gitcd frappe_dockercp -R devcontainer-example .devcontainercp -R development/vscode-example development/.vscode
- do configuration changes as required by editing
.devcontainer/docker-compose.yml
copied in above instruction - Inside WSL 2 linux run following commands
- For Installing VS Code Developer Container Extension:
code --install-extension ms-vscode-remote.remote-containers
- open frappe_docker folder in VS Code by following command:
code .
- reopen the WSL 2 based development folder in development container by CTRL+SHIFT+P and selecting
Reopen in Container.
Oh you are setup of VS Code with docker for your frappe development.
Next Step is now the setup of bench, adding and installing the apps over site(s).
Now you have two ways to do it
- Automatic Script to setup bench, create site and install apps defined in apps.json
- Manually: By choosing environment and apps
For purpose of this QuickStart blog, will choose Automatic Script.
Follow these steps to do so:
- Edit apps.json as per your requirement
- In VS code terminal (CTRL+SHIFT+`) run
cp apps-example.json apps.jsonbash installer.sh
Above steps will ask for details like
- Client name (for using name in default apps.json enter is
client_name
) - bench directory name (default is frappe-bench)
- site name: this name should end with
.localhost
e.g.site1.localhost
And, you are done with the installation of apps.
___
Concluding Remarks: One of the benefits of using Docker for Frappe Framework app development is that it provides a consistent environment for development, testing, and production. The Docker image can be tested on a local machine and then deployed to a production environment with confidence that it will run as expected. This helps to reduce the risk of environment-related issues and makes it easier for developers to focus on writing code.
Another advantage of using Docker for Frappe Framework app development is that it makes it easy to scale applications. Applications can be deployed as multiple containers, which can run on different machines. This makes it possible to scale applications horizontally by adding more containers, or vertically by increasing the resources of a single container. This allows developers to build highly scalable applications that can handle a large number of users and transactions.
In conclusion, using Docker for Frappe Framework app development provides many benefits for developers. It makes it easy to deploy and run applications, provides a consistent environment for development, testing, and production, and makes it easy to scale applications. With the growing popularity of Docker, it is a valuable tool for developers who want to build powerful and efficient applications using the Frappe Framework.
Official Blogger
Official Blog of Jmacaire Tech
No comments yet. Login to start a new discussion Start a new discussion