Skip to content

Architecture

Alok Singh edited this page Oct 27, 2023 · 23 revisions

The project is divided into these parts

frappe-manager Python Package

  • this package introduces fm command
  • This package serves as the entry point for the FrappeManager project and provides the following key functionalities:
  1. Metadata Generation: It reates essential metadata required for setting up a Bench environment. This metadata includes sitename, admin password, and the list of Frappeverse apps to be installed.

  2. Docker Compose Configuration: It customizes and generates a Docker Compose project with metadata as input for the entrypoint script. This project contains various services to support Frappe development.

  3. Docker Compose Management: It utilizes a Docker Compose CLI wrapper to manage the Docker Compose project. This allows for easy control and orchestration of containers for the development environment.

  4. Commands for Environment Management: The Python package provides helpful commands to manage the FrappeManager environment. These commands streamline common development tasks.

  5. Sites Directory Creation: It creates a directory at ~/home/<currentuser>/frappe to store Frappe sites. This directory is where the Frappe sites are managed.

Docker Compose Project

The Docker Compose project includes the following services:

  • Frappe (custom build):

    • Configures the server environment, including setting up pyenv and server-specific configurations.
    • Creates a Bench environment for Frappe app development.
    • Installs required Frappeverse apps.
    • Creates and manages Frappe sites with associated databases.
    • Initiates Supervisor as the init process, containing a service for starting the Frappe development server.
  • Nginx (custom build):

    • Extends the features of the official Nginx Docker image.
    • Incorporates input from the frappe-manger Python package to create site-specific Nginx configurations from templates.
  • MariaDB: Manages the database and provides persistence storage using Docker volumes.

  • Adminer: A fully-featured database management tool, serving as an alternative to phpMyAdmin for database management.

  • Mailhog: An email testing tool with a fake SMTP server underneath, enabling email testing during development.

  • Redis: Utilized for various purposes with the following services:

    • redis-cache
    • redis-queue
    • redis-socketio

Exposed Ports

The Docker Compose project exposes the following ports:

  • Port 80 for HTTP.
  • Port 443 (work in progress) for HTTPS.
  • Port 9000 for the Node SocketIO server, used by Frappe for WebSocket polling.
Clone this wiki locally