Question about deployability of SaaS vs dockerized project
Unanswered
Alligator mississippiensis posted this in #help-forum
Alligator mississippiensisOP
hey everyone, I've got a situation - I'm building a website that will have a frontend, backend (backend possibly not in Next.js I haven't decided yet), a CRON job that will need to run every few minutes (light job, shouldn't be too expensive) and a database. I'm looking to open source this project but also have it up online for convenience. The thing is, this is going to be an open source project and ideally I'd love to have a version of the site running (for cheap) for everyone to see, aswell as a dockerized version to run on your own.
Because the dockerized version will have all the services (particularly the DB) running locally whereas the SaaS version that will be live will be using services, I'm wondering if it's worth the effort of developing for both instead of just choosing 1, GPT has suggested that since I've yet to start this should be plausible and if designed correctly, it would only be a secretsfile change for the local / SaaS deployment, but I'd like to ask people. Would this be plausible to deploy for both? Would this make development a living hell?
Because the dockerized version will have all the services (particularly the DB) running locally whereas the SaaS version that will be live will be using services, I'm wondering if it's worth the effort of developing for both instead of just choosing 1, GPT has suggested that since I've yet to start this should be plausible and if designed correctly, it would only be a secretsfile change for the local / SaaS deployment, but I'd like to ask people. Would this be plausible to deploy for both? Would this make development a living hell?
6 Replies
Serbian Hound
I don't understand what you're asking clearly, but if you have a dockerized stack of a project and intend to host a live version, then you'd use that docker compose and just deploy. Literally thing of that as a live instance
in essence the difference between your live version and the open source is an
.env file with secrets@Serbian Hound in essence the difference between your live version and the open source is an `.env` file with secrets
Alligator mississippiensisOP
yeah thats what i meant to ask, how different would it be apart from the
.env file, sorry for the bad wording but in essence thats what im aiming for for the live version vs the dockerized versionPteromalid wasp
yeah for sure
you can totally build it in a way that supports both without turning dev into a nightmare.
if you keep the app clean and modular, the only real difference between “local docker stack” and “cheap hosted SaaS stack” ends up being env vars + connection strings.
the trick is: treat every service (db, cron, backend, frontend) as its own container or module, then let the env file decide where each one points.
locally it hits your docker network, in prod it hits your hosted db / scheduler. same code, different config.
so yeah, it’s doable.
just keep your interfaces clean and don’t hard-wire anything.
want me to walk you through a simple structure for it?
you can totally build it in a way that supports both without turning dev into a nightmare.
if you keep the app clean and modular, the only real difference between “local docker stack” and “cheap hosted SaaS stack” ends up being env vars + connection strings.
the trick is: treat every service (db, cron, backend, frontend) as its own container or module, then let the env file decide where each one points.
locally it hits your docker network, in prod it hits your hosted db / scheduler. same code, different config.
so yeah, it’s doable.
just keep your interfaces clean and don’t hard-wire anything.
want me to walk you through a simple structure for it?
@Greek Shepherd Ai ahh reply 💀
Pteromalid wasp
what? no, that is my opinion.