Deployment Guide
ApiTap includes a static frontend documentation site that can be deployed to any Nginx server.
Prerequisites
Ubuntu VPS
Debian-based system
Nginx
sudo apt install nginx
SSH Access
To the server
One-Command Deployment
Automated Deployment Script
Packs artifacts, uploads via SCP, and configures Nginx
bash
# Run from the project root ./scripts/deploy.shScript Configuration
The script reads connection details from a .env file (which is ignored by git).
Step 1: Copy the Example File
bash
cp .env.example .envStep 2: Edit .env with Your VPS Details
bash
HOST="your-vps-ip"
PORT="22" # SSH Port
USER="ubuntu" # SSH User
REMOTE_DIR="/var/www/apitap"Manual Deployment
Optional: If you prefer to deploy manually
1
Frontend Assets
Copy the contents of frontend/ to /var/www/apitap
2
Nginx Config
Copy frontend/nginx.prod.conf to /etc/nginx/sites-available/apitap
3
Enable Site
Link the config and reload Nginx
bash
sudo ln -s /etc/nginx/sites-available/apitap /etc/nginx/sites-enabled/ sudo systemctl reload nginxDirectory Structure on Server
file structure
/var/www/apitap/
├── index.html
├── css/
├── js/
└── docs/
├── index.html
└── ...