-
Notifications
You must be signed in to change notification settings - Fork 28
Architecture
The project is divided into these parts
- This package introduces
fm
command - This package serves as the entry point for the FrappeManager project and provides the following key functionalities:
-
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.
-
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.
-
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.
-
Commands for Environment Management: The Python package provides helpful commands to manage the FrappeManager environment. These commands streamline common development tasks.
-
CLI Directory Creation: It creates a directory at
~/home/<currentuser>/frappe
to storefrappe-manger
managed sites. This contains 2 sub directories:-
logs
-> here cli logs are stored. -
sites
-> here sites docker compose project is stored.
-
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-manager
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
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.
- are stored in
/home/<user>/frappe/logs/fm.log
- logs contains:
- every fm command invoked by user.
- executed docker commands, command output and return code.
- exception happend during runtime.
- logs are rotated when the log size hits 10 MB, creates files like fm.log.1 when rotate limit is reached.