Skip to content

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 the plane.env configuration file.
  • /root/nginx/: The directory housing the Nginx proxy configuration and the compose.yml file 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.

  1. Download the installation script from the official release repository:
    https://github.com/makeplane/plane/releases/download/v1.0.0/setup.sh
    
  2. Save the script to /root/install.sh with executable permissions (0755).
  3. Execute the script to perform the initial installation. The script presents an interactive menu where the user selects the "Install" action (Option 1).
  4. 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/letsencrypt for storing SSL certificates.
    • /data/nginx/user_conf.d: Mounted to /etc/nginx/user_conf.d for custom Nginx configurations.

To start the Nginx and Certbot services, the following command is executed in the /root/nginx directory:

docker compose up -d

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-certbot container using Let's Encrypt.
  • Port Configuration: The Nginx proxy is configured to listen on port 8080 as defined in the plane.env file.
  • CORS Configuration: The CORS_ALLOWED_ORIGINS setting in the plane.env file is configured to allow requests from the specific domain https://{{ 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 to 0755 with ownership by root:root.
  • /root/nginx/compose.yml: Set to 0644 with ownership by root:root.
  • /root/install.sh: Set to 0755 to allow execution.
  • Application data directories: Created with 0755 permissions.

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 -d within the /root/nginx directory.
  • Updating: The installation script can be re-run to update the application components. The Nginx container will pull the latest image if the compose.yml is updated and docker compose up -d is executed again.
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×