Deployment Overview of BrainyCP on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu
-
Privileges: Root or sudo access is required for installation.
-
Network Ports:
-
80/443: External web traffic (HTTPS). -
8000: Internal application port. -
8002: Proxy communication port.
FQDN of the final panel on the hostkey.in domain¶
The access URL for the control panel is generated based on a specific template:
| Parameter | Value |
|---|---|
| Prefix | brainycp |
| Domain | hostkey.in |
| Full template | brainycp{Server_ID}.hostkey.in |
Application installation process¶
The installation of BrainyCP is performed using a dedicated installer script through the following steps:
-
Dependency Check: The system ensures that
wgetis installed to facilitate the download of the installer. -
Installer Download: The official BrainyCP installer script is downloaded from
http://core.brainycp.com/install.shand stored at/root/install.sh. -
Execution: The installation script is executed non-interactively using the command:
-
System Reboot: A system reboot is performed automatically following a successful installation to finalize all service configurations and kernel updates.
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to manage Nginx and SSL certificates via Certbot. This container is managed using a compose.yml file located in /root/nginx/.
Nginx-Certbot Container
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Restart Policy:
unless-stopped -
Environment Variables:
-
CERTBOT_EMAIL:[email protected] -
Volumes:
-
nginx_secrets:/etc/letsencrypt(External volume for SSL certificates) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(Configuration directory mapping)
Custom Scripts and Additional Setup¶
The deployment includes several configuration adjustments to integrate the application with the Nginx proxy:
-
Nginx Configuration Modification: The system automatically modifies the site configuration files located in
/data/nginx/user_conf.d/. It removes existingproxy_passdirectives within thelocation /block and replaces them with a new directive pointing to the internal service: -
Directory Setup: A directory structure is created at
/root/nginxto house the proxy configuration files.
Application Update Instructions¶
To update the BrainyCP application, you must re-run the installation script:
For the Nginx proxy container, use the following command in the /root/nginx directory:
Location of configuration files and data¶
The following paths are used for application data and configurations:
-
Installation Directory:
/usr/local/brainycp -
Nginx User Configurations:
/data/nginx/user_conf.d/ -
SSL Certificates: Managed via the
nginx_secretsDocker volume. -
Proxy Compose File:
/root/nginx/compose.yml
Available ports for connection¶
The following ports are utilized by the system:
| Port | Usage |
|---|---|
| 443 | Secure Web Access (HTTPS) |
| 8000 | Internal Application Service |
| 8002 | Local Proxy Communication |