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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
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)
General Steps to Set it Up
1. Create a DigitalOcean Droplet
Ubuntu 24.04
Pick 1vCPU, 1GB RAM, 25GB SSD (the cheapest one)
Add SSH keys for secure login.
2. Initial Server Setup
Update packages (
sudo apt update && sudo apt upgrade
)Set up basic firewall (UFW) to allow only SSH, HTTP, and HTTPS.
Install Docker + Docker Compose.
3. Project Structure (on Server)
Prepare Your Apps
Backend: Make a
Dockerfile
to run Express.jsFrontend: 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).5. Set up Docker Compose
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.
6. SSL Certificate
Set up Let’s Encrypt SSL easily using:
Certbot (with NGINX)
OR Traefik (which auto-manages certificates)
7. Domain Setup
Point your domain DNS to your Droplet IP.
Configure NGINX to serve frontend at
/
and backend API at/api/
.