r/devops • u/kuro_zip7 • 7d ago
Ops / Incidents Deployment of Web and Mobile application
I'm new to deploy an application to the internet. Lately I have been developing a CRM application for my company and they needed deployment support too from my side(*they lack technical support team to make things out). I'm using Ubuntu 24 Desktop for development purposes, and I'm planning to use Ubuntu 24 Server for testing(*staging) and production. Now what's the literal confusion is, I'm already hosting a website inside the machine which is the real production application of what I'm currently developing inside which I was lately planning to change it from Ubuntu Desktop to Server(*the application haven't been launched to public). Now, is it ideal to use the Desktop version of Ubuntu which I'm currently using, or go with Server version of Ubuntu to proceed with production.
Plans I have:
- Make use of 2 servers, one for development(*which I'm already doing right now) and local testing of application and one for testing(*staging) and production purpose
- Use ssh communication to the other server(*production server) to handle CI/CD builds
- Use github actions to push the docker image to other server to make it run the real application
For further clear understandings:
The application I'm developing already is being hosted in some website, more like a SaaS product, used cloudflare tunneling and pm2 instance for server-like modification of current system, with database running inside the machine, not inside any cloud services, so npm run build pushes all the changes to the site directly without any CI/CD checks like traditional devops cycle, and I'm already testing the application with real db of the company inside the production site, which literally all officials of the office knows(*they don't have much technical knowledge at all). There's a literal rush at that time in my office from Directors to host the website with the real application without any time delays. That's why I got messed up in the production so much. I'm now planning to stash the hosted website from the machine currently been hosted just by removing the machine tunneling, reinstall Ubuntu Server, configure directories properly and use PR and tags for changes inside the real application.
Tech stacks being used:
- React js for frontend of web app
- React Native for mobile app
- Express JS over Node JS for backend
- PostgreSQL for DB
- Seaweedfs for S3 object storage
- JWT for authentication and bcrypt js for hashing
I need a support from you guys for this chaos I'm literally stuck in!!!!!!!!!!!!!!!!!
Am I cooked brotha????
Is this the right way or should I change my own path of implementing??
1
u/Apart-Tailor-5727 7d ago
RemindMe! 3 days
1
u/RemindMeBot 7d ago
I will be messaging you in 3 days on 2026-10-11 19:06:56 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
RemindMeBot is switching to username summons. Instead of
!RemindMe 1 day, useu/RemindMeBot 1 day. More info.
Info Custom Your Reminders Feedback
1
u/Immediate_Wheel1953 6d ago
You're not cooked, this is a totally normal first deploy setup. One change I'd make: don't build the image on the prod server over ssh, build it once in GitHub Actions and have prod just pull it. I used to build on the box itself and one day an npm build ate all the memory and took the site down mid deploy. Also back up that postgres data before you move it into a container, that's the part that actually bites.
1
1
u/SasukeUrushy 6d ago
You're not cooked, but get production off that desktop machine and onto Ubuntu Server as planned, and split staging and prod onto separate boxes so you're never testing against the real company database again. Your GitHub Actions to Docker image to server plan is solid; just make sure you're pulling images on the server rather than SSHing in to build, and set up proper health checks before you cut over.
1
u/nemo_chan 5d ago
the scary part isn’t ubuntu desktop vs server, it’s testing against your company’s live postgres db. i’d fix that first and make sure you have a working backup before reinstalling anything. changing the OS won’t solve that problem
1
u/raisputin 5d ago
You should have given it to Codex/Claude from day 1 and had it write it, choosing the best tech for want you want to do, and have it find the least expensive way to host it (probably AWS or similar, and let it use their native tooling. And no. That doesn’t mean you need containers, it doesn’t mean you need k8s.
I have released several things into prod using just this strategy and haven’t needed containers or k8s yet, and I’m about to release to beta a new SaaS Product
2
u/singh_abinashi 7d ago
I'd do the same split. Dockerize the Express API first, so prod is a compose file, not a PM2 process list on someone's desktop. Keep a separate Postgres instance with separate credentials per environment. And back up the prod DB before you touch any of it.