Live data from Hacker News

Awesome Docker Compose Examples

github.com

41–50 of 85 posts

Re: Awesome Docker Compose Examples

#41
post #37

Earlier quoted context omitted.

no offense, but man, the amount of tooling you guys are using sounds to me insane. How is a person able to oversee and understand everything. The older i get the more i feel distantiated and disconnected to these modern practices. I am afraid that if I ever have to find a new workspace i wont be able to succeed because of this.

No offense but that list of tools is miniscule and you should pause if you think it's anywhere near "insane". For comparison a regular handyman with a basic set of tools easily has 50+ if they just started. It's definitely possible to understand all of that and way more. Unless you're fresh out of uni and never worked on a professional company with more than a couple of people you'd see many more.

I'm not GP, but I used to write firmware. I had a C compiler, a debugger, and emacs.

IIUC, if you write a web application in the MS world, you have Visual Studio, ASP.Net, and IIS.

There doesn't have to be piles of libraries.

Re: Awesome Docker Compose Examples

#42

Earlier quoted context omitted.

What if the docker daemon is on a storage server and the host volume of /stuff contains, say, 10 terabytes of photo album content? > If you tell me to run > > docker run -v ${HOME}/stuff:/stuff alpine > > It will mount /home/stuff on the server, not my own > home directory on my laptop. That seems about right? And then you note: > What I don't do is create a directory someplace and manually edit files and mount them.…

> What if the docker daemon is on a storage server and the host volume of /stuff contains, say, 10 terabytes of photo album content? In this extreme example I think probably a bind mount might make sense, especially if the files are already there. But the named volume would just be stored in /var/lib/docker/volumes/some-volume-name, so as long as that /var/lib has 10TB I don't see the problem. I can use my sftp conta…

docker etc is on a flash partition, data is on a few 16 drive arrays…

… but this made me discover this:

    docker volume create \
     --driver local \
     --opt type=cifs \
     --opt device=//uxxxxx.your-server.de/backup \
     --opt o=addr=uxxxxx.your-server.de,\
           username=uxxxxxxx,\
           password=*****,\
           file_mode=0777,dir_mode=0777 \
     --name cif-volume
So that simplifies a lot for my use cases.

Thank you for all the replies!

Re: Awesome Docker Compose Examples

#43

Earlier quoted context omitted.

> What if the docker daemon is on a storage server and the host volume of /stuff contains, say, 10 terabytes of photo album content? In this extreme example I think probably a bind mount might make sense, especially if the files are already there. But the named volume would just be stored in /var/lib/docker/volumes/some-volume-name, so as long as that /var/lib has 10TB I don't see the problem. I can use my sftp conta…

docker etc is on a flash partition, data is on a few 16 drive arrays… … but this made me discover this: docker volume create \ --driver local \ --opt type=cifs \ --opt device=//uxxxxx.your-server.de/backup \ --opt o=addr=uxxxxx.your-server.de,\ username=uxxxxxxx,\ password=*****,\ file_mode=0777,dir_mode=0777 \ --name cif-volume So that simplifies a lot for my use cases. Thank you for all the replies!

Thats really cool, I've only ever used the local driver with default settings, which stores to /var/lib/docker, but I guess theres different storage drivers that do different sorts of storage. nice find!

Re: Awesome Docker Compose Examples

#44

Earlier quoted context omitted.

These are excellent, thank you. I maintain similar Django and Flask + compose stacks on behalf of the startup studio I work for so it’s fun to compare notes. For our Django stack, for instance, we have also settled on Postgres, on celery+redis, and on whitenoise. black/flake8/isort also seem universally agreeable. We also throw in pyright and generally make extensive use of type hints. For the front-end, we’re curren…

no offense, but man, the amount of tooling you guys are using sounds to me insane. How is a person able to oversee and understand everything. The older i get the more i feel distantiated and disconnected to these modern practices. I am afraid that if I ever have to find a new workspace i wont be able to succeed because of this.

No offense taken. As a fellow old person (whose first computer as a young kid was a TI-99/4A) I definitely feel this pain.

But because I am also an old engineer who works with a lot of other old engineers we are lucky to have a shocking number of human-years’ accumulated experience not only selecting a pile of tools and frameworks but also sticking with them from zero to $BIGCO. Put another way, I’ve shot myself in the foot more times than I can count with these tools and I do it less often and in more esoteric ways these days.

I can’t claim the same degree of experience with all these tools, of course. Pyright is bleeding edge. Tailwind is still the new kid. Relative to (say) Python and Django or Flask, React is new too. Most of the pain and learnings come from these newer moving parts.

Is it “better”? That depends on the axes of evaluation. As a startup studio where the 70% case might be “SaaS that takes a back-office process held together today by Excel & email and makes it way better” the answer is: sometimes, unequivocally yes. Not just because of the tools and the potential velocity they can confer, but because of the kinds of teams we can build around them. Sometimes, plain old Django with nothing added is a clearly better choice.

In the end, every startup is its own snowflake. We try to select “starter stacks” that balance industry familiarity with our ability to offer meaningful operational perspective. We definitely don’t think of them as the final world.

Re: Awesome Docker Compose Examples

#45
Given that these are a lot of homelab examples; this is great. I use a bunch of these and plan to use more.

But part of me still makes me think about what I think might be the gold standard of self-hosted, cloud-like things, and that's Syncthing? As in, all of these things should try to figure out how to be like syncthing?

Re: Awesome Docker Compose Examples

#46

Earlier quoted context omitted.

> Using @-hashes doesn't assure you of not getting pwned the same way here It does, changes to the image could be pushed to "latest" or a specific tag, but the hash cannot change, once you've established that a specific hash is secure, it'll remain secure (or rather, as secure as you first established it as).

I think the parent comments point was that it’s difficult, if not impossible, to verify the security of even a particular hash. It’s still vulnerable to the same dependency chain vulnerabilities as pinning to latest, but instead locking in a particular version and _hoping_ that it wasn’t pwned. Additionally, you are then not getting any exploit fixes that may be included in newer versions, so even if there was a vuln…

A future compromise of a publisher key by a malware injecting party cannot compromise you if you don't update. Pulling from a tag leaves you open to this at any time without warning if the image publisher is compromised.

Re: Awesome Docker Compose Examples

#47
post #8
post #6

There's a lot of "tool" selections in that repo. If anyone is looking for ready to go web app examples aimed at both development and production with Docker Compose, I maintain: - https://github.com/nickjj/docker-flask-example - https://github.com/nickjj/docker-rails-example - https://github.com/nickjj/docker-django-example - https://github.com/nickjj/docker-node-example - https://github.com/nickjj/docker-phoenix-exam…

This looks great. Definitely a few idioms I will have to explore further. I can use Docker in a basic sense, but it is amazing to me how much black arts still exists for what has become a cornerstone of modern deployment. Lots of conflicting/dated advice about best practices. Unsure which advice is still required/applies to podman, etc.

> but it is amazing to me how much black arts still exists for what has become a cornerstone of modern deployment.

What?! Unless you are using complicated networking, docker is simple. Dockerfiles are essentially just annoying-syntax shell scripts.

We have plenty of black arts in computing. Docker isn't one of them.

Re: Awesome Docker Compose Examples

#48
repos sitting in my Bookmarks.

* https://github.com/docker/awesome-compose

* https://github.com/PostHog/posthog

* https://github.com/growthbook/growthbook

* https://github.com/fleetdm/fleet

Supposedly, One can search github using `language:typescript filename:docker-compose.yml stars:>1000` but it's not working for me somehow.

Re: Awesome Docker Compose Examples

#49
post #6

There's a lot of "tool" selections in that repo. If anyone is looking for ready to go web app examples aimed at both development and production with Docker Compose, I maintain: - https://github.com/nickjj/docker-flask-example - https://github.com/nickjj/docker-rails-example - https://github.com/nickjj/docker-django-example - https://github.com/nickjj/docker-node-example - https://github.com/nickjj/docker-phoenix-exam…

These are excellent, thank you. I maintain similar Django and Flask + compose stacks on behalf of the startup studio I work for so it’s fun to compare notes. For our Django stack, for instance, we have also settled on Postgres, on celery+redis, and on whitenoise. black/flake8/isort also seem universally agreeable. We also throw in pyright and generally make extensive use of type hints. For the front-end, we’re curren…

Offtopic, but I've googled Tailwind because of this comment. This seems absolutely crazy to me, in the worst sense imaginable. So, there was (and still is) "style" attribute in HTML. It leads to lots of repetition and yadda yadda, so people started using classes instead to write their CSS. There are dozens of schools of "best practices", or meta-frameworks, or actual frameworks to make it all more manageable, but now typically each element still has like 5 different classes specifically to define styles. So, finally someone got tired of it and came up with an ingenious solution: JS framework that dynamically defines CSS-classes with CSS-property-like names to write styles right in the HTML again, but to use class attribute instead of style attribute?! What's even the point?!

Re: Awesome Docker Compose Examples

#50

FWIW the standard now says the file should be called "compose.yaml"; "docker-compose.yaml" is supported but deprecated

Ambitious decision. As if docket-compose is the only tool that uses the word compose, and there is no other extremely common tool, that uses for configuration, for instance, files like composer.json and composer.lock.
Post reply on HN