Live data from Hacker News

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

simplecto.com

291–300 of 347 posts

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

#291

Earlier quoted context omitted.

Good news! Since ten years ago, you don't have to! def myfunc(foo: Dict[str, MyObject], bar: int, baz: str) -> List[MyObject]:

This is the same programming community that is half stuck on Python 2, no way should anybody expect types to have reached majority mindshare.

I've only heard this "stuck on Python 2" FUD from non-Python programmers, you may want to get your arguments with the times.

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

#292

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…

You must be the only person who ever runs that on your own code because you skipped the pyenv step

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

#293

Earlier quoted context omitted.

and pipx for managing python "apps" like youtube-dl, ipython, meson, ... https://pipxproject.github.io/pipx/

I prefer my system for running youtube-dl in an isolated environment without having to install all of its dependencies on the host. Ansible writes a bash script at ~/bin/youtube-dl containing: #!/usr/bin/env bash set -e IMAGE_NAME="grepular/youtube-dl" # Build the image if it does not exist if [[ $(podman images --filter "reference=$IMAGE_NAME" -q) == "" ]]; then podman build -t "$IMAGE_NAME" - &2 FROM python:3-slim…

Pipx is pretty much that - installs a package into its own venv and links script entry points to .local/bin

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

#294

Earlier quoted context omitted.

This is the same programming community that is half stuck on Python 2, no way should anybody expect types to have reached majority mindshare.

I've only heard this "stuck on Python 2" FUD from non-Python programmers, you may want to get your arguments with the times.

Weird of you to assume that I don't work in Python. Do you just not interact with the scientific Python community? Your anecdata that is blind to large swathes of the community is no more valid than my firsthand experiences. This comes off as defensive, not informed.

It's an objective fact that Python 3 was not adopted quickly (given various EOL deadline extensions) and that plenty of libraries are stuck on 2, so your point that types have been around for 10 years is not really an argument that I can actually expect to be able to use types when working within the ecosystem.

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

#295

Earlier quoted context omitted.

I've only heard this "stuck on Python 2" FUD from non-Python programmers, you may want to get your arguments with the times.

Weird of you to assume that I don't work in Python. Do you just not interact with the scientific Python community? Your anecdata that is blind to large swathes of the community is no more valid than my firsthand experiences. This comes off as defensive, not informed. It's an objective fact that Python 3 was not adopted quickly (given various EOL deadline extensions) and that plenty of libraries are stuck on 2, so you…

I work in web development, Django moved to 3 exclusively versions ago, and I drop support for Python 2 pretty easily in the libraries I maintain. numpy requires at least 3.7, same for pandas, and sklearn is at least 3.6. When you say "half stuck in Python 2", do you mean you have a lot of legacy code you don't want to update? Because I don't think that's Python's fault.

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

#296

Earlier quoted context omitted.

Weird of you to assume that I don't work in Python. Do you just not interact with the scientific Python community? Your anecdata that is blind to large swathes of the community is no more valid than my firsthand experiences. This comes off as defensive, not informed. It's an objective fact that Python 3 was not adopted quickly (given various EOL deadline extensions) and that plenty of libraries are stuck on 2, so you…

I work in web development, Django moved to 3 exclusively versions ago, and I drop support for Python 2 pretty easily in the libraries I maintain. numpy requires at least 3.7, same for pandas, and sklearn is at least 3.6. When you say "half stuck in Python 2", do you mean you have a lot of legacy code you don't want to update? Because I don't think that's Python's fault.

Ah, so the answer to "do you interact with scientists" is no, even though scientists are responsible for a huge amount of the python code that exists. Got it, maybe consider that your experience isn't universal.

I don't know why you think dismissing legacy code is valid! More code is old than new in the world, and the idea that you're only going to run into codebases with the most up to date versions of software seems pretty naive to me.

Serverless runtimes have historically been behind on Python versions, Airflow had a hell of a time with dependency issues and Python 2, etc etc.

I also don't really care whose fault it is - the question isn't "is Python morally wrong", the question is "can I rely on the technology that you offer as the solution to a problem as being actually used by the community and therefore actually a viable solution to the problem." Python type annotations are not popular.

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

#297
post #232

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…

I'm not trying to pick on you personally here but this comment, like many I see on HN, seems overly adversarial and could have made the same arguments in a less combatative way. There's a lot of emphasis on your own perspective: "*I* don't get", "*I've* been doing that", "Not once have *I* missed Docker", "making *me* less productive", "*my* personal experience*" And an assumption that it applies to others: "Just use…

> I'm not trying to pick on you personally here but this comment, like many I see on HN, seems overly adversarial.

Ironically I find the first comment non-adversarial and this comment overly-adversarial, but maybe that’s just me.

People are allowed to disagree and share their own experiences, and OP didn’t say anything nasty about anyone. I would prefer a space where people share their honest experiences with reasoning over one where everything has to be coated in sugar to make it digestible. And I’m sure the author of the post can handle hearing someone else’s differing opinion, it’s a discussion forum after all - not a blind agreement forum.

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

#298
post #109

Earlier quoted context omitted.

Python apps have worse performance, bigger image size and longer build times on Alpine Linux: https://pythonspeed.com/articles/alpine-docker-python/

For running applications in production, Alpine Linux is harmful and should be avoided. Getting a smaller container image is not worth trading mucl for glibc.

To a Docker outsider, to me this implies that Alpine for testing and non-Alpine for production is not harmful. Is that right? Wasn't having a unified environment half the point of using Docker? Doesn't two different base systems just open you up to a load of headaches? If so, then isn't it more of a "Alpine Linux as a Docker base is harmful" situation?

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

#299

Earlier quoted context omitted.

I work in web development, Django moved to 3 exclusively versions ago, and I drop support for Python 2 pretty easily in the libraries I maintain. numpy requires at least 3.7, same for pandas, and sklearn is at least 3.6. When you say "half stuck in Python 2", do you mean you have a lot of legacy code you don't want to update? Because I don't think that's Python's fault.

Ah, so the answer to "do you interact with scientists" is no, even though scientists are responsible for a huge amount of the python code that exists. Got it, maybe consider that your experience isn't universal. I don't know why you think dismissing legacy code is valid! More code is old than new in the world, and the idea that you're only going to run into codebases with the most up to date versions of software seem…

> I don't know why you think dismissing legacy code is valid!

Because everyone everywhere has legacy code. In that sense, Python isn't split between versions any more than any other language, making that statement moot.

If you want to use type annotations, you can, for years now. If you want to use macros to generate macros in Rust, you can, it's not Rust's fault if you're stuck on 1.20 and don't want to upgrade.

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

#300

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…

At work I had to set up a server with django, postgres, SSL, rabbitmq, celery and a few other things. I did it in both ansible and docker-compose, the ansible version was 1500 lines and docker-compose version was 100 lines. A lot of the ansible stuff is dealing with users, groups, services, supervisord, virtualenvs and repositories - none of this is required in docker as containers restart themselves, users are alrea…

Cost benefit trade offs of Docker will fit some and not others. For smaller projects with less change and few+standard components Docker is probably overkill. In other cases Ansible is too fiddly or slow.

Still important to keep in mind those Docker images must be maintained too.

Post reply on HN