Live data from Hacker News

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

simplecto.com

221–230 of 347 posts

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

#221

Earlier quoted context omitted.

How much experience do you have with Docker? I am not being snarky -- all the things you say sounds like something I would have said until I pulled myself together and learned how to use it properly. And granted, that did take a bit of effort but now my perspective is that Docker is extraordinarily easy to work with. A Dockerfile is almost exactly like your requirements.txt file, only it works for everything. Need Im…

I don't have a lot of experience with Docker, but it's not what's holding me back. Here are some of my pain points: 1) Having to "docker exec" to get a shell in a running container vs just running the command (in dev) or sshing into the server (in prod). 2) Tests taking 3:30 min to run with docker vs 30 secs without. And then of course, you don't just run tests once but many times, leading to tens of minutes on a giv…

Tests running with this difference implies a misconfiguration or a whole lot of difference on setting up the test pipeline. You shouldnt blame it on docker before investigating the issue.

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

#223
post #136

Earlier quoted context omitted.

This is a pretty common sentiment on HN and I’m sure you have your reasons for it, but to me personally it just seems bonkers. Docker is an absolutely game-changing tool for me. I can’t count the number of times it’s saved me from completely screwed up system libraries, tools installing config files in weird places, conflicting versions of this or that, or other versions of system pollution. I write a simple docker-c…

If you think Docker helps with Sandboxing, you're mistaken. Docker is a huge security hole. Oh, Crypto miners ....

Yeah. Somebody above goes “users are already setup in docker” and it makes me laugh...

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

#224

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 c…

You probably want your references without leading spaces, just add another line feed to get them on separate lines and avoid the "code block" that doesn't parse links:

[0] https://github.com/dokku/dokku

[1] https://12factor.net/

[2] http://www.fabfile.org/

[3] https://github.com/johnwilson/django-wagtail-template/blob/m...

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

#225

Earlier quoted context omitted.

Few hours of annoyance per developer in the beginning vs. a few minutes every time you run tests or when you debug. Also add in the overhead of configuring a debugging system where you work in an ide and debug code running in a docker image. Doable (though many of my fellow Devs have just given up) but also takes time, probably more than to run pip and get psycopg2 installed on Macs. Also the majority of engineers pr…

If you think it's okay to spend a few hours setting stuff up per developer, why can't you just invest an hour in learning how to debug with docker?

Because I have, my colleagues have, in fact we probably spent more than an hour and just decided it's not worth it. I decided it's not worth it because I had a way to debug, while others decided they will just code without proper debugging tools because they only want to work through docker.

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

#226

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…

QQ, aren't the created files owned by root?

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

#227

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…

Most of the stuff you would be doing with Ansible happens inside the Dockerfiles. So comparing lines of code of your Ansible codebase with just the docker-compose file is not fair towards Ansible.

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

#228
post #207
post #205

Docker, traefik and debian auto-update alone allow me to run all my side projects on a single semi-beefy machine i pay I like to try new JS technologies and those alone sometimes need different node versions - i would hate to spend time on these issues. My deployment is 2 lines: DOCKER_HOST=ssh://user@mydomain.com docker-compose up Did not have to touch it for years

Except for the traefik v2 upgrade, forgot to mention that. But aside from that no work whatsoever.

hah. Same here. Upgrading traefik is one of my more popular posts: https://www.simplecto.com/migrate-from-traefik-1-x-to-2-x/

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

#229

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…

> usage of Docker made it more expensive to host

It depends on how you're using it.

Docker itself isn't going to increase your hosting costs. If you rent a server for $20 a month, it's still $20 a month with or without Docker being installed.

Post reply on HN