Volare: A Technical Guide to Deploying and Managing the Music Discovery Platform
Volare: A Technical Guide to Deploying and Managing the Music Discovery Platform
Prerequisites and Scope
This manual provides detailed instructions for system administrators and DevOps engineers responsible for deploying and maintaining the Volare music and culture discovery platform. Volare is a Tier 3 web application designed for the UK market, focusing on blog-style content delivery for music, entertainment, and cultural topics.
Scope: This guide covers the initial server deployment, core service configuration, and basic operational management.
Prerequisites:
- A Ubuntu 22.04 LTS server (or equivalent) with root/sudo access.
- Domain name pointed to your server's IP address (e.g., volare-platform.co.uk).
- Basic proficiency with Linux command line, Git, and web server administration.
Procedure
- Server Initialization and Security
Connect to your server via SSH and execute the following commands to update the system and configure a basic firewall.
sudo apt update && sudo apt upgrade -y sudo apt install ufw sudo ufw allow OpenSSH sudo ufw allow 80,443/tcp sudo ufw --force enableExpected Result: The system is updated, and only SSH (port 22), HTTP (port 80), and HTTPS (port 443) ports are accessible.
- Install Core Dependencies
Volare is built on a LEMP stack. Install Nginx, MySQL, and PHP along with required modules.
sudo apt install nginx mysql-server php8.1-fpm php8.1-mysql php8.1-curl php8.1-xml php8.1-mbstring -ySecure the MySQL installation and create a dedicated database for Volare.
sudo mysql_secure_installation sudo mysql # Within MySQL shell: CREATE DATABASE volaredb; CREATE USER 'volareadmin'@'localhost' IDENTIFIED BY 'YourStrongPassword123!'; GRANT ALL PRIVILEGES ON volaredb.* TO 'volareadmin'@'localhost'; FLUSH PRIVILEGES; EXIT;Expected Result: The LEMP stack is installed, and a secure MySQL database named `volaredb` is ready.
- Deploy Volare Application Code
Clone the Volare repository from the designated Git source to the web root.
sudo apt install git -y sudo git clone https://your-git-repo.com/volare/production.git /var/www/volareSet the correct ownership and permissions for the web directory.
sudo chown -R www-data:www-data /var/www/volare sudo chmod -R 755 /var/www/volare/storage /var/www/volare/bootstrap/cacheExpected Result: The application code is placed in `/var/www/volare` with appropriate permissions for the web server.
- Configure Web Server (Nginx)
Create an Nginx server block configuration file for your domain.
sudo nano /etc/nginx/sites-available/volareInsert the following configuration, replacing `volare-platform.co.uk` with your actual domain.
server { listen 80; server_name volare-platform.co.uk www.volare-platform.co.uk; root /var/www/volare/public; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } }Enable the site and test the configuration.
sudo ln -s /etc/nginx/sites-available/volare /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginxExpected Result: Nginx successfully serves the Volare application at your domain on HTTP.
- Configure Application Environment
Navigate to the application directory and configure the environment file.
cd /var/www/volare sudo cp .env.example .env sudo nano .envUpdate the following key variables in the `.env` file:
APP_NAME=Volare APP_ENV=production APP_URL=http://volare-platform.co.uk DB_DATABASE=volaredb DB_USERNAME=volareadmin DB_PASSWORD=YourStrongPassword123!Generate the application encryption key and run database migrations.
sudo php artisan key:generate sudo php artisan migrate --seedExpected Result: The application is configured, the database schema is populated, and the site is functionally accessible.
- Secure with SSL (HTTPS)
Install Certbot to obtain a free SSL certificate from Let's Encrypt.
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d volare-platform.co.uk -d www.volare-platform.co.ukFollow the interactive prompts. Certbot will automatically modify your Nginx configuration to use HTTPS and set up auto-renewal.
Expected Result: Your Volare platform is securely accessible via `https://volare-platform.co.uk`.
Troubleshooting
Issue 1: 502 Bad Gateway Error
Cause: PHP-FPM service is not running or the socket path in the Nginx config is incorrect.
Resolution: Check the status of PHP-FPM and the socket file.
sudo systemctl status php8.1-fpm
ls -la /var/run/php/php8.1-fpm.sock
Ensure the `fastcgi_pass` directive in your Nginx config points to the correct socket path.
Issue 2: Database Connection Refused
Cause: MySQL service is down, or the credentials in the `.env` file are incorrect.
Resolution: Verify MySQL is running and test the credentials.
sudo systemctl status mysql
mysql -u volareadmin -p -e "SHOW DATABASES;"
Double-check the `DB_*` variables in the `/var/www/volare/.env` file.
Issue 3: CSS/JS Files Not Loading (404)
Cause: Incorrect file permissions or the Nginx `root` directive points to the wrong directory.
Resolution: Confirm the `root` is set to `/var/www/volare/public` and reset permissions.
sudo chown -R www-data:www-data /var/www/volare
sudo chmod -R 755 /var/www/volare/public
Issue 4: Let's Encrypt SSL Renewal Fails
Cause: Firewall blocking port 80, or domain DNS misconfiguration.
Resolution: Ensure UFW allows port 80 and that your domain's A record correctly points to the server IP. Test renewal manually.
sudo ufw status
sudo certbot renew --dry-run