Live data from Hacker News

Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

simplecto.com

111–120 of 347 posts

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#111
post #14

He says "docker, just plain docker" but in reality uses docker-compose - in my view a significant addition. However it aligns well with my own sentiments - for anything below large scale complexity or scalability needs, docker-compose hits a beautiful simplicity vs power tradeoff.

I like docker compose but what's friendly for using it server side and not relatively manual?

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#112

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

It's very easy to have pretty painless RoR codebases above 1000 LoC without any challenges or problems...

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#113

Earlier quoted context omitted.

Right, but in this case that's not a thing anyways since there's only one server.

The main reason for me is that Postgres can be backed up while online, and I can scale up to multiple servers if I suddenly need to. Not so much with SQLite where if a small project suddenly hit the front page of whatever I would suddenly need to get really creative.

I'm not sure how well the architecture described in the article lends itself to horizontal scaling since everything assumes it's on the same machine (I think?). Granted, if you build for horizontal scaling I agree, a client/server database is the way to go.

As for backups, SQLite also supports backups while another process is using the database.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#114
Or you could just use Dokku [0]? I don't mean to criticise the author's stack but if you just really want to focus on your application and spend less time figuring/learning about deployment then just adopt the 12 factor [1] approach and use Dokku with Fabric[2] for you server setup. I have a sample fabfile [3] I use for my initial server setup that I can easily modify to suit different project needs.

Ultimately, it comes down to personal preferences but Dokku being installable on your development machine (via virtualbox) you've got a very similar environment to production.

  [0] https://github.com/dokku/dokku
  [1] https://12factor.net/
  [2] http://www.fabfile.org/
  [3] https://github.com/johnwilson/django-wagtail-template/blob/master/fabfile.py

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#115

I don't get why people use Docker for "small SaaS apps" where "scale is not an issue". You can run everything without Docker to remove an extra level of indirection. I've been doing that exact thing with a very similar Django stack for years. Not once have I missed Docker. On the other hand, I have taken over SaaS projects where the (unnecessary) usage of Docker made it more expensive to host, decidedly more difficul…

It’s too fucking hard to setup python with all its pyenv, anaconda, poetry, pip requirements.txt and what-not, that’s the best use case for Docker here. Get it to work once and forget about it.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#116

I don't get why people use Docker for "small SaaS apps" where "scale is not an issue". You can run everything without Docker to remove an extra level of indirection. I've been doing that exact thing with a very similar Django stack for years. Not once have I missed Docker. On the other hand, I have taken over SaaS projects where the (unnecessary) usage of Docker made it more expensive to host, decidedly more difficul…

It’s too fucking hard to setup python with all its pyenv, anaconda, poetry, pip requirements.txt and what-not, that’s the best use case for Docker here. Get it to work once and forget about it.

I also dislike all those tools you mention. So often, I feel like devs use a tool "because it's cool" but fail to appreciate the complexity it adds - not just for themselves but for others. The frustration expressed by your comment is a perfect example of this.

In my ideal world, everybody would just use what comes with vanilla Python:

  python3 -m venv venv
  source venv/bin/activate
  (Or `call` on Win)
  pip install -Ur requirements.txt

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#117

I don't get why people use Docker for "small SaaS apps" where "scale is not an issue". You can run everything without Docker to remove an extra level of indirection. I've been doing that exact thing with a very similar Django stack for years. Not once have I missed Docker. On the other hand, I have taken over SaaS projects where the (unnecessary) usage of Docker made it more expensive to host, decidedly more difficul…

This kind of thinking is why engineering departments have tech debt.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#118
post #117

I don't get why people use Docker for "small SaaS apps" where "scale is not an issue". You can run everything without Docker to remove an extra level of indirection. I've been doing that exact thing with a very similar Django stack for years. Not once have I missed Docker. On the other hand, I have taken over SaaS projects where the (unnecessary) usage of Docker made it more expensive to host, decidedly more difficul…

This kind of thinking is why engineering departments have tech debt.

I get your point but don't think you're getting mine. In a bigger project / organization? Yes, let's have those processes and tools. But for simple apps as described in the article? Use a correspondingly simple solution. As always in software development, it's all about context.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#119
post #38

Earlier quoted context omitted.

That is a double edged sword. Sure, that dynamically typed language of python or ruby might be quick to develop on but they often contain a lot of surprising bugs. Compilers catch a lot of bugs before your software is in production.

I don’t know. I keep seeing this argument. I’ve been developing on the Django stack for the past 10+ years. I have fixed many bugs if mine and of others. It has been extremely rare, if at all, that they were bugs caused by an incorrect type. The closest I can think of is a typo in a method or class name, but is it really a bug if you catch it instantly? These are just not the types of bugs that end up creeping into t…

Has Django's ORM syntax changed recently?

If not, this is the first time I've heard someone say it's a pleasure to read/write.

I've done lots of Python over the years (Zope3, Django, flask, aiohttp, custom stuff...), and if there is one thing I wouldn't like to come back to, it's Django.

Sure, it's a do-everything toolset, but the syntax is an abomination (imho, at least, though I hope that doesn't need to be stressed every time).

To contrast ORM syntax, look at old SQLObject, Canonical's Storm or both SQLAlchemy's declarative and core implementations.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#120

Earlier quoted context omitted.

It’s too fucking hard to setup python with all its pyenv, anaconda, poetry, pip requirements.txt and what-not, that’s the best use case for Docker here. Get it to work once and forget about it.

I also dislike all those tools you mention. So often, I feel like devs use a tool "because it's cool" but fail to appreciate the complexity it adds - not just for themselves but for others. The frustration expressed by your comment is a perfect example of this. In my ideal world, everybody would just use what comes with vanilla Python: python3 -m venv venv source venv/bin/activate (Or `call` on Win) pip install -Ur r…

Venv is great for keeping dependencies separate but if your local machine doesn’t have the same version of Python as your server then you’ll need pyenv.
Post reply on HN