Advanced Setup Guide

Environment Variables

Configuring your environment correctly is crucial for advanced functionality. Set the following environment variables before running the application:

export
export
export
export
export

You can typically set these in your shell profile (e.g., ~/.bashrc or ~/.zshrc) or using a .env file.

Security Note: Never commit sensitive information like API keys or passwords directly into your codebase. Use environment variables or secure secret management tools.

Network Configuration

For advanced deployments, you might need to configure network interfaces and firewall rules. Ensure that the necessary ports are open for communication:

  • Application Port: Default is 8080. Ensure this port is accessible from where clients will connect.
  • Database Port: Typically 5432 for PostgreSQL or 3306 for MySQL.
  • Cache Port: If using Redis, usually 6379.

Example using ufw (Uncomplicated Firewall) on Ubuntu:

sudo ufw allow 8080/tcp
sudo ufw allow 5432/tcp

Consult your network administrator or cloud provider's documentation for specific firewall configurations.

Database Schema Migrations

When deploying new versions or making structural changes, you'll need to run database migrations. Ensure your database is accessible and then execute the migration command:

./manage.sh

This command will apply all pending schema changes to your database. It's recommended to run this in a controlled environment before production deployment.

Important: Always back up your database before running any migration scripts.

Feature Flags

Enable or disable experimental features using feature flags: