Deployment Overview of Plane on Server¶
Prerequisites and Basic Requirements¶
The deployment process requires a server running the Ubuntu operating system. The system must have administrative privileges to execute package updates, create directories, and manage Docker containers. The following network ports and services are utilized:
- Port 8080: Configured for the Nginx proxy to handle incoming traffic for the Plane application.
- Docker Engine: Required for running the application containers and the Nginx-Certbot proxy.
- Internet Access: Necessary for downloading the installation script and pulling Docker images.
File and Directory Structure¶
The application and its supporting components are organized within specific directories on the server. The primary locations include:
/root/plane-app/: The main directory containing the Plane application files and theplane.envconfiguration file./root/nginx/: The directory housing the Nginx proxy configuration and thecompose.ymlfile for the reverse proxy and SSL management./root/install.sh: The location of the downloaded installation script used to deploy and manage the application./data/nginx/: The storage location for Nginx secrets and user configurations, mapped as volumes for the Docker container.
Application Installation Process¶
The Plane application is installed using a dedicated installation script provided by the developers. The process involves downloading the script and executing it to set up the environment.
- Download the installation script from the official release repository:
- Save the script to
/root/install.shwith executable permissions (0755). - Execute the script to perform the initial installation. The script presents an interactive menu where the user selects the "Install" action (Option 1).
- After the initial setup, the script is executed again to start the application services by selecting the "Start" action (Option 2).
The installation script automatically handles the creation of necessary directories and the deployment of the application version v1.0.0.
Docker Containers and Their Deployment¶
The deployment utilizes Docker containers for both the Plane application and the Nginx reverse proxy.
Nginx and Certbot Container¶
A separate Docker Compose setup manages the Nginx proxy and Let's Encrypt certificate generation. This is configured in the /root/nginx/compose.yml file.
- Image:
jonasal/nginx-certbot:latest - Restart Policy:
unless-stopped - Network Mode:
host - Environment Variables:
CERTBOT_EMAIL: Set to[email protected]- Additional environment variables are loaded from
/data/nginx/nginx-certbot.env
- Volumes:
nginx_secrets: An external volume mounted to/etc/letsencryptfor storing SSL certificates./data/nginx/user_conf.d: Mounted to/etc/nginx/user_conf.dfor custom Nginx configurations.
To start the Nginx and Certbot services, the following command is executed in the /root/nginx directory:
Proxy Servers¶
The deployment includes an Nginx proxy server configured to handle SSL termination and reverse proxying for the Plane application.
- Proxy Software: Nginx running inside a Docker container with integrated Certbot for automatic SSL certificate management.
- SSL Configuration: Managed automatically by the
nginx-certbotcontainer using Let's Encrypt. - Port Configuration: The Nginx proxy is configured to listen on port
8080as defined in theplane.envfile. - CORS Configuration: The
CORS_ALLOWED_ORIGINSsetting in theplane.envfile is configured to allow requests from the specific domainhttps://{{ prefix }}{{ server_id }}.hostkey.in.
Permission Settings¶
File and directory permissions are set to ensure secure operation of the application and proxy services.
/root/nginx/: Set to0755with ownership byroot:root./root/nginx/compose.yml: Set to0644with ownership byroot:root./root/install.sh: Set to0755to allow execution.- Application data directories: Created with
0755permissions.
Starting, Stopping, and Updating¶
The application lifecycle is managed through the installation script and Docker commands.
- Starting the Application: Run the installation script and select the "Start" option (Option 2) from the interactive menu.
- Starting the Proxy: Execute
docker compose up -dwithin the/root/nginxdirectory. - Updating: The installation script can be re-run to update the application components. The Nginx container will pull the latest image if the
compose.ymlis updated anddocker compose up -dis executed again.