By mayricoak
My Apps Structures
I need to set the apps to public facing soon, but Im newbie about the deployment and preparations Could you help me to prepare or give me the recomendations for my fullstack architecture, give the cost effective if possible
I got some exprienced for deploy using pm2 and reverse proxy from my old vps server, and some docker and container knowledgements
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Heya,
Here is a rough plan on how you can proceed with yoru setup:
1 DigitalOcean Droplet (smallest $6/month plan or $8 if you want better CPU performance)
Inside the droplet:
Dockerized environment (separate containers for backend, frontend, and MySQL)
Reverse proxy (NGINX or Traefik) for HTTPS (SSL with Let’s Encrypt)
Volume for MySQL data persistence (so you don’t lose DB data on container restart)
Ubuntu 24.04
Pick 1vCPU, 1GB RAM, 25GB SSD (the cheapest one)
Add SSH keys for secure login.
Update packages (sudo apt update && sudo apt upgrade
)
Set up basic firewall (UFW) to allow only SSH, HTTP, and HTTPS.
Install Docker + Docker Compose.
/app
/backend (your Express app)
/frontend (your React app built with Vite)
/mysql-data (Docker volume for MySQL data)
docker-compose.yml
nginx.conf
Backend: Make a Dockerfile
to run Express.js
Frontend: Build your React app (npm run build
) → serve static files with Nginx or a Node server.
Database: Use a MySQL Docker image (official one is fine).
Environment Variables: Use a .env
file (but never commit it publicly).
One service for backend
One for frontend (optional if you use Nginx directly)
One for MySQL
One for Nginx as reverse proxy
Use Docker volumes for MySQL persistence.
Set up Let’s Encrypt SSL easily using:
Certbot (with NGINX)
OR Traefik (which auto-manages certificates)
Point your domain DNS to your Droplet IP.
Configure NGINX to serve frontend at /
and backend API at /api/
.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.