How to Deploy FrankBoard on a VPS with PostgreSQL
How to Deploy FrankBoard on a VPS with PostgreSQL
This guide provides a streamlined workflow for deploying FrankBoard on a virtual private server using Docker and a PostgreSQL backend for enhanced data reliability and performance.
What You'll Need
- VPS with a clean Linux installation (Ubuntu 22.04 LTS recommended)
- Docker and Docker Compose installed
- SSH access with root or sudo privileges
- Open ports 80 and 443 on your firewall
Steps
Step 1: Prepare the Environment
Create a dedicated directory for your project files to keep the installation organized. Navigate into this folder and create a docker-compose.yml file to define your service architecture.
Step 2: Configure PostgreSQL Service
Define a PostgreSQL container in your compose file using the latest stable image. Set the environment variables for POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB to ensure a secure, isolated database instance.
Step 3: Define the FrankBoard Service
Add the FrankBoard image to your configuration, linking it to the PostgreSQL network. Map the internal application port to port 80 on your host machine for external accessibility.
Step 4: Establish Persistent Storage
Configure Docker volumes for both the PostgreSQL data directory and the FrankBoard application storage. This prevents data loss during container updates or server restarts.
Step 5: Launch the Stack
Execute the command 'docker-compose up -d' to pull the images and start the containers in detached mode. Verify that both services are running correctly using 'docker ps'.
Step 6: Initialize the Database
Access the FrankBoard web interface via your VPS IP address to complete the initial setup. Follow the on-screen prompts to connect the application to the PostgreSQL backend using the credentials defined in your compose file.
Step 7: Secure with a Reverse Proxy
Deploy Nginx or Traefik to handle incoming traffic and implement SSL certificates via Let's Encrypt. This ensures all project data and credentials are encrypted during transit.
Expert Tips
- Use a strong, unique password for the PostgreSQL root user and store it in a .env file rather than hardcoding it in the YAML.
- Regularly back up the PostgreSQL volume to an external storage location to ensure disaster recovery.
- Limit the VPS memory allocation for the database container to prevent it from consuming all system resources during heavy indexing.