58
submitted 3 years ago* (last edited 3 years ago) by bronzing@lemmy.fmhy.ml to c/selfhosted@lemmy.world

Hi,

I'm using docker-compose to host all my server services (jellyfin, qbittorrent, sonarr, etc.). I've recently grouped some of them into individual categories and then merged the individual docker-compose.yml file I had for each service into one per category. But is there actually any reason for not keeping them together?

The reason why is I've started configuring homepage and thought to myself "wouldn't it be cool if instead of giving the server IP each time (per configured service in homepage) I'd just use the service name?" (AFAIK this only works if the containers are all in the same file).

you are viewing a single comment's thread
view the rest of the comments
[-] midas@ymmel.nl 8 points 3 years ago

I would not. Create an external network and just add those to the compose files.

[-] theterrasque@infosec.pub 4 points 3 years ago

Bingo. Or just bite the bullet and dive into Kubernetes

[-] Auli@lemmy.ca 3 points 3 years ago

Overkill for home use

Back when I used to use Docker this is what I was doing. If you use a reverse proxy that is Docker-aware (eg Traefik), it can still connect to the services by name and expose them out as subdomains or subpaths based on the names.

But I graduated to Kubernetes a long time ago.

[-] zbecker@mastodon.zbecker.cc 0 points 3 years ago

@midas @bronzing

Out of curiosity why not? this is what I have been doing forever.

[-] midas@ymmel.nl 2 points 3 years ago

So there's a million ways to do things and what works for you works for you. For me, putting all services ina single compose file only has downsides.

  • Difficult to search, I guess searching for a name and then just editing the file works - but doesn't it become a mess fairly quickly? I sometimes struggle with just a regular yaml file lmao
  • ^also missing an overview of what you're exactly running - docker ps -a or ctop or whatever works - but with an ls -la I clearly see whats on my system
  • How do you update containers? I use a 'docker compose pull' to update the images which are tagged with latest.
  • I use volume mounts for config and data. A config dir inside the container is mounted like './config:/app/data/config' - works pretty neatly if each compose file is in its own named directory
  • Turning services on/off is just going into the directory and saying docker compose up -d / or down - in a huge compose file don't you have to comment the service out or something?
this post was submitted on 09 Jul 2023
58 points (100.0% liked)

Selfhosted

61853 readers
433 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS