How to Deploy FrankBoard Using Docker and PostgreSQL
How to Deploy FrankBoard Using Docker and PostgreSQL
This guide provides a streamlined workflow to launch a self-hosted FrankBoard instance on a VPS, ensuring a persistent data layer via PostgreSQL.
What You'll Need
- VPS with a Linux distribution (Ubuntu recommended)
- Docker and Docker Compose installed
- Root or sudo user access
- A domain name pointing to the server IP (optional for local testing)
Steps
Step 1: Prepare the Environment
Create a dedicated directory for your deployment to keep configuration files organized. Navigate into this folder and initialize a git repository or a simple project folder to house your compose file.
Step 2: Configure the Docker Compose File
Create a docker-compose.yml file defining two primary services: the FrankBoard application and a PostgreSQL database. Ensure you specify the image versions and map the necessary ports, typically port 80 or 443 for the web interface.
Step 3: Define Environment Variables
Set up a .env file to store sensitive credentials, including the PostgreSQL password, database name, and FrankBoard secret keys. This prevents hardcoding credentials directly into the compose file and simplifies future updates.
Step 4: Establish Persistent Volumes
Configure Docker volumes in your compose file to map the PostgreSQL data directory and FrankBoard's upload folders to the host machine. This ensures your project boards and user data persist even if the containers are restarted or updated.
Step 5: Launch the Containers
Run the command 'docker-compose up -d' to pull the required images and start the services in detached mode. Verify that both the application and database containers are running using 'docker-compose ps'.
Step 6: Verify Database Connectivity
Check the container logs using 'docker-compose logs -f' to confirm that FrankBoard has successfully established a connection with the PostgreSQL instance. Look for a successful migration or database initialization message.
Step 7: Finalize Initial Setup
Access the FrankBoard web interface via your server's IP address or domain. Follow the on-screen prompts to create your initial administrative account and configure your first work board.
Expert Tips
- Use a reverse proxy like Nginx Proxy Manager or Traefik to easily manage SSL certificates via Let's Encrypt.
- Schedule regular backups of the PostgreSQL volume to prevent data loss during server migrations.
- Limit the memory and CPU usage for the PostgreSQL container in your compose file to optimize VPS resource allocation.
- Keep your Docker images updated by periodically running 'docker-compose pull' followed by a restart.