[PR #14461] [CLOSED] feat: single compose file including hwaccel #14280

Closed
opened 2026-02-05 15:29:27 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/14461
Author: @mertalev
Created: 12/3/2024
Status: Closed

Base: mainHead: chore/set-image-in-hwaccel


📝 Commits (1)

📊 Changes

5 files changed (+324 additions, -161 deletions)

View changed files

📝 docker/docker-compose.dev.yml (+107 -21)
📝 docker/docker-compose.prod.yml (+107 -21)
📝 docker/docker-compose.yml (+110 -22)
docker/hwaccel.ml.yml (+0 -43)
docker/hwaccel.transcoding.yml (+0 -54)

📄 Description

Description

The hwaccel.*.yml files are separate for two reasons: to make it easier to set all the appropriate settings without missing anything or caring about the details, and to avoid cluttering the services with a bunch of commented lines.

However, the fact that they're separate files makes them inconvenient, and many platforms don't expose the ability to have multiple Compose files. Uncommenting the extends section and changing the right fields from cpu is simple but also somewhat awkward, and it becomes more awkward in a dev workflow as you have to stash and unstash changes.

This PR moves all of this into the same Compose file and makes it possible to set the transcoding and machine learning backends just through the IMMICH_TRANSCODING_BACKEND and IMMICH_MACHINE_LEARNING_BACKEND environmental variables. This makes it easier to configure with fewer steps, leaves less room for error, and makes it much more convenient for development.

The way it does this is crafty: it defines services for these configs, disables them by assigning a profile to them so they don't actually run, extends the server and machine learning services from the same Compose file, uses environmental variable interpolation in this extends section to allow the extended service to be changed dynamically, and lastly unsets the profiles field in these services so they do in fact run.

How Has This Been Tested?

I tested both with and without these envs and confirmed all immich services run, that these special services don't run, and that the envs affect building and configuration.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/14461 **Author:** [@mertalev](https://github.com/mertalev) **Created:** 12/3/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `chore/set-image-in-hwaccel` --- ### 📝 Commits (1) - [`1134133`](https://github.com/immich-app/immich/commit/1134133f38a12480c16cf04ceb7c58df57b5e972) single compose file ### 📊 Changes **5 files changed** (+324 additions, -161 deletions) <details> <summary>View changed files</summary> 📝 `docker/docker-compose.dev.yml` (+107 -21) 📝 `docker/docker-compose.prod.yml` (+107 -21) 📝 `docker/docker-compose.yml` (+110 -22) ➖ `docker/hwaccel.ml.yml` (+0 -43) ➖ `docker/hwaccel.transcoding.yml` (+0 -54) </details> ### 📄 Description ## Description The `hwaccel.*.yml` files are separate for two reasons: to make it easier to set all the appropriate settings without missing anything or caring about the details, and to avoid cluttering the services with a bunch of commented lines. However, the fact that they're separate files makes them inconvenient, and many platforms don't expose the ability to have multiple Compose files. Uncommenting the `extends` section and changing the right fields from `cpu` is simple but also somewhat awkward, and it becomes more awkward in a dev workflow as you have to stash and unstash changes. This PR moves all of this into the same Compose file and makes it possible to set the transcoding and machine learning backends *just* through the `IMMICH_TRANSCODING_BACKEND` and `IMMICH_MACHINE_LEARNING_BACKEND` environmental variables. This makes it easier to configure with fewer steps, leaves less room for error, and makes it much more convenient for development. The way it does this is crafty: it defines services for these configs, disables them by assigning a profile to them so they don't actually run, extends the server and machine learning services from the same Compose file, uses environmental variable interpolation in this `extends` section to allow the extended service to be changed dynamically, and lastly unsets the `profiles` field in these services so they do in fact run. ## How Has This Been Tested? I tested both with and without these envs and confirmed all immich services run, that these special services don't run, and that the envs affect building and configuration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 15:29:27 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#14280