Frappe/ERPNext Single Node Environment (SNE): Streamlining Development Workflow

Developing for ERPNext can often involve complex setup processes that consume valuable time and resources. As developers and contributors, we at Vyogo Technology recognized this challenge and set out to create a solution that would streamline the development workflow. Today, I’m excited to share our contribution to the ERPNext ecosystem: the Single Node Environment (SNE) for development purposes.

What is SNE?

The Single Node Environment (SNE) is a specialized Docker container solution designed to eliminate the lengthy setup process typically required for ERPNext development. SNE provides a pre-installed, bootable container that comes with a ready-to-use site and all necessary apps already configured.

Key Features

1. Pre-installed and Ready to Run

Unlike other solutions that require additional configuration after pulling the image, SNE containers are completely pre-installed. When the container starts, the bench automatically launches with dev.localhost, allowing you to begin development immediately.

2. Multiple Version Support

We currently publish SNE images for:

  • ERPNext v15: vyogo/erpnext:sne-version-15
  • Development branch: vyogo/erpnext:sne-develop

3. Customizable Build Process

The build process can be easily customized to include any custom app such as CRM, Insights, or your own proprietary modules by simply updating the app.json file.

4. Easy Custom App Mounting

SNE facilitates easy mounting of custom apps, making it ideal for developers working on multiple apps simultaneously.

5. Gitpod Integration

We’ve designed SNE to work seamlessly with Gitpod, enabling cloud-based development environments that are consistent across your team.

How SNE Differs from Other Solutions

The primary difference between SNE and other available solutions is our focus on immediate productivity. While most containers require additional installation steps, configuration, or site creation after initialization, our containers are:

  1. Pre-installed: All necessary components are already set up
  2. Pre-configured: The site is created and ready to use
  3. Instantly available: As soon as the container starts, you can access dev.localhost

This approach dramatically reduces the time from container initialization to actual development work.

Technical Implementation

SNE leverages Source-to-Image (s2i) based builds to create these pre-configured containers. This approach allows us to:

  1. Execute the entire installation process during the image build
  2. Commit the fully configured state to the container image
  3. Ensure consistency across all deployments of the image

Getting Started with SNE

Quick Start

Using Docker

Pull the appropriate image based on your needs:

# For ERPNext v15
docker pull vyogo/erpnext:sne-version-15

# For the development branch
docker pull vyogo/erpnext:sne-develop

# For the latest stable release
docker pull vyogo/erpnext:sne-latest

Run the container:

docker run -p 8000:8000 -p 9000:9000 vyogo/erpnext:sne-version-15

Once started, access your development environment at http://dev.localhost:8000

Using Docker Compose

For a more streamlined setup, especially when mounting custom apps for development, you can use Docker Compose. Create a docker-compose.yml file with the following content:

version: '3'

services:
  frappe-sne:
    image: docker.io/vyogo/erpnext:sne-latest
    ports:
      - "8000:8000"
    volumes:
      - ../:/home/frappe/frappe-bench/apps/{custom_appname}
    entrypoint: /usr/libexec/s2i/run

Replace {custom_appname} with the name of your custom app. This configuration mounts your local app directory into the container’s apps directory, enabling real-time development.

Start your development environment with:

docker-compose up

This approach is particularly useful for teams working on custom apps as it ensures everyone has the same development environment while allowing local changes to be immediately reflected in the running container.

Customizing Your Build

To include custom apps in your SNE build:

  1. Fork our repository: GitHub - vyogotech/frappista: s2i based images for Frappe Framework. Experience all in one pre-installed Frappe and apps.
  2. Modify the app.json file to include your custom apps
  3. Build your customized image using the provided scripts

Real-world Benefits

Using SNE in our development workflow has yielded significant improvements:

  1. Time savings: Developers can start working on code within minutes instead of hours
  2. Consistent environments: Everyone works with identical setups, eliminating “works on my machine” issues
  3. Improved onboarding: New team members can get up and running quickly
  4. Resource efficiency: Less time spent on setup means more time for actual development

Future Roadmap

At Vyogo, we’re committed to continuing innovation on this project. Some features we’re planning include:

  1. Additional version support
  2. Enhanced customization options
  3. Improved performance optimizations
  4. Better integration with CI/CD pipelines

Contribute

The source code for this solution is available at: GitHub - vyogotech/frappista: s2i based images for Frappe Framework. Experience all in one pre-installed Frappe and apps.

We welcome contributions, feedback, and feature requests from the community.

Conclusion

The Single Node Environment represents our commitment to improving the developer experience in the ERPNext ecosystem. By eliminating setup time and providing a consistent, ready-to-use environment, we hope to boost productivity and lower the barrier to entry for ERPNext development.

We at Vyogo will continue to innovate and provide more features to support the ERPNext community.

3 Likes