Server Setup¶
The infrastructure for Socon-MKT is split between traditional server hosting for the backend and modern serverless delivery for the frontend.
The backend is hosted on a DigitalOcean droplet, utilizing a custom subdomain managed via Cloudflare DNS. The frontend SPA (React/Vite) is hosted on Cloudflare Pages, which automatically builds and deploys directly from the GitHub repository.
1. Frontend Deployment (Cloudflare Pages)¶
The frontend requires zero server maintenance. Deployment is handled automatically via Cloudflare Pages:
- Connect the Cloudflare dashboard to the
sokoni-mktGitHub repository. - Set the build command to
npm run buildand the output directory todist. - Cloudflare automatically provisions the SSL certificate and deploys the build globally to their CDN edge network.
2. Backend Server Initialization (DigitalOcean)¶
When provisioning a fresh DigitalOcean droplet, the first step is to create a dedicated user (e.g., socon) and update the system packages.
Update and install system dependencies:
sudo apt update && sudo apt upgrade -y
sudo apt install python3-pip python3-venv python3-dev libpq-dev postgresql postgresql-contrib nginx git -y