this post was submitted on 12 Jul 2023
118 points (92.8% liked)

Selfhosted

40152 readers
628 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

For the vast majority of docker images, the documentation only mention a super long and hard to understand "docker run" one liner.

Why nobody is placing an example docker-compose.yml in their documentation? It's so tidy and easy to understand, also much easier to run in the future, just set and forget.

If every image had an yml to just copy, I could get it running in a few seconds, instead I have to decode the line to become an yml

I want to know if it's just me that I'm out of touch and should use "docker run" or it's just that an "one liner" looks much tidier in the docs. Like to say "hey just copy and paste this line to run the container. You don't understand what it does? Who cares"

The worst are the ones that are piping directly from curl to "sudo bash"...

you are viewing a single comment's thread
view the rest of the comments
[–] morethanevil@lmy.mymte.de 3 points 1 year ago (1 children)

I always use docker-compose. It is very handy if you ever want to have a good backup or move the whole server to another. Copy over files -> docker compose up -d and you are done For beginners, they should use docker compose from the start. Easier than docker run

If you ever want to convert those one-liner to a proper .yml then use this converter

[–] casrou@feddit.dk 2 points 1 year ago (2 children)

That is one docker compose up -d for each file you copied over, right.. Or are you doing something even smarter?

[–] morethanevil@lmy.mymte.de 3 points 1 year ago (1 children)

I have one docker-compose.yml for each service. You can use docker compose -f /path/to/docker-compose.yml up -d in scripts

I would never use "one big" file for all. You only get various problems imo

[–] SheeEttin@lemmy.world 3 points 1 year ago (1 children)

You use a separate file for each service? Why? I use one file for each stack, and if anything, breaking them out would give me issues.

[–] morethanevil@lmy.mymte.de 2 points 1 year ago

I meant stack 😸

My structure is like

/docker/immich/docker-compose /docker/synapse/docker...

But I read that some people make one big file for everything

[–] prenatal_confusion@lemmy.one 2 points 1 year ago

I have all services in one compose file. Up -d starts them all. Servicename up -d is more selective.