Advanced Setup Guide
Environment Variables
Configuring your environment correctly is crucial for advanced functionality. Set the following environment variables before running the application:
You can typically set these in your shell profile (e.g., ~/.bashrc or ~/.zshrc) or using a .env file.
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
5432for PostgreSQL or3306for 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:
This command will apply all pending schema changes to your database. It's recommended to run this in a controlled environment before production deployment.
Feature Flags
Enable or disable experimental features using feature flags: