immich icon indicating copy to clipboard operation
immich copied to clipboard

[Feature] Unraid Community Image

Open alextran1502 opened this issue 2 years ago • 31 comments

Publish the app to Unraid Community.

Follow the guide here

alextran1502 avatar Mar 29 '22 03:03 alextran1502

Is there an existing Docker image on Docker Hub already or would one need to get it into a registry?

JamesTeague avatar Mar 29 '22 22:03 JamesTeague

Also there seems to be a dependency on Postgres running in port 5432. Did I read that right? If so, that port should probably be configurable defaulting to 5432.

JamesTeague avatar Mar 29 '22 23:03 JamesTeague

@JamesTeague There is no image that contains the whole application yet. I am working on the branch deployment/containerize-app-into-single-dockerfile to accomplish that goal.

It is correct that the Postgres port is 5432. You can access it on your local machine as well as throughout your local network with the VM IPV4

alextran1502 avatar Mar 30 '22 00:03 alextran1502

@alextran1502 Regarding the port that is true, but there will be people running Postgres in a container not using port 5432. It's generally not a good assumption that the database will be exposed on that port. So in the case of Unraid it would help users to know that this template requires their own postées instance but it shouldn't also dictate the port they have to expose on the container. Or if for some reason they are running multiple instances of the database, 1 has to be running on a different port.

Once the container is in the registry though I wouldn't mind helping get the template set up and tested. Or trying to contribute on other things as well.

JamesTeague avatar Mar 30 '22 00:03 JamesTeague

@JamesTeague There is no image that contains the whole application yet. I am working on the branch deployment/containerize-app-into-single-dockerfile to accomplish that goal.

Isn't the immich image sufficient if using an existing database?

Kjeldgaard avatar May 21 '22 18:05 Kjeldgaard

@JamesTeague There is no image that contains the whole application yet. I am working on the branch deployment/containerize-app-into-single-dockerfile to accomplish that goal.

Isn't the immich image sufficient if using an existing database?

There is a message queue that utilizes Redis for passing the message across the background processes, so you would need Redis as well.

Now that I am adding a web interface that is using SvelteKit, which has its own built-in Nodejs server, this adds an additional complexity to the process of putting everything into a single Docker image.

alextran1502 avatar May 21 '22 19:05 alextran1502

I actually already have Redis up and running, but how should that be configured? According to 'Step 1' from https://github.com/alextran1502/immich, there is only the database configuration.

Kjeldgaard avatar May 21 '22 20:05 Kjeldgaard

@JamesTeague There is no image that contains the whole application yet. I am working on the branch deployment/containerize-app-into-single-dockerfile to accomplish that goal.

Isn't the immich image sufficient if using an existing database?

I think so, most people probably want to decouple that and Redis anyway.

JamesTeague avatar May 21 '22 21:05 JamesTeague

@JamesTeague There is no image that contains the whole application yet. I am working on the branch deployment/containerize-app-into-single-dockerfile to accomplish that goal.

The branch doesn't exist anymore. It would be very nice to have a single container to deploy. I already have postgres and redis dockers running and don't want to deploy other instances.

martabal avatar Jul 22 '22 20:07 martabal

You can use environment variables to point your Immich services at your existing redis and postgres containers, check the .env file

zackpollard avatar Jul 22 '22 20:07 zackpollard

Is it possible to get rid of the .env file and to use only the environment variables ? It would allow to run the services with docker run

martabal avatar Jul 31 '22 09:07 martabal

Sure, you can skip the .env file and pass the variables in any other way you like.

bo0tzz avatar Aug 01 '22 04:08 bo0tzz

For now Immich works with Unraid with the docker-compose plugin but in my understanding to run with the docker run command, it would be easier to integrate the entrypoint in the Dockerfile. Is there any particular reason to put it outside the file?

martabal avatar Aug 07 '22 21:08 martabal

yes the custom entrypoint is the main problem .. in my case, even in advanced docker mode in unraid i don't see where to put the custom entrypoint for each image.

Nonobis avatar Aug 08 '22 11:08 Nonobis

There is the --entrypoint argument but it is for overwriting the default entrypoint of the image. But there is no entrypoint by default in the images. So it is currently impossible to run Immich images with docker run

martabal avatar Aug 08 '22 16:08 martabal

The images are built on top of the node base image, so there is a default entrypoint defined that you can override. A command like docker run --entrypoint /bin/sh altran1502/immich-server:release ./start-server.sh works just fine (it doesn't have the necessary config, but it will start the right executable). That said, I agree that having entrypoints defined in the images is nicer, and I've suggested it to the team.

bo0tzz avatar Aug 08 '22 17:08 bo0tzz

For a release on Unraid, it would be a lot better to avoid arguments other than path, device, port or environment variable. Other arguments has to be passed with the extra-parameters field which is not very user-friendly. And of course to have only one image.

martabal avatar Aug 08 '22 19:08 martabal

Sorry for my useless message but I have to say I would really love ab easy unraid install !!!

guim31 avatar Aug 09 '22 15:08 guim31

I managed to install altran1502/immich-server:release on Unraid without docker-compose. But for now there is too many images to publish it for Unraid community. Another thing I noticed with my install is that I created a specific user on Postgres to Immich but it didn't work, I had to pass the default postgres user to work.

martabal avatar Aug 14 '22 19:08 martabal

Thanks @martabal for your feedback. I hope someone with some Docker skills could merge all those images in one !

guim31 avatar Aug 16 '22 18:08 guim31

No problem, I will try to merge the images next week

martabal avatar Aug 17 '22 14:08 martabal

No problem, I will try to merge the images next week

You’d be a hero here. Looking forward to this! :-)

blaine07 avatar Aug 21 '22 14:08 blaine07

No problem, I will try to merge the images next week

Yea thanks, keen to give this a go :)

dsfsdbvxc avatar Aug 24 '22 14:08 dsfsdbvxc

I managed to install altran1502/immich-server:release on Unraid without docker-compose

@martabal how did manage to override the entrypoint? unraid webpage Extra Parameters doesn't seems to help Edit: Nevermind I got it working, I needed to use "Post Argument" commnad

dhruvinsh avatar Sep 02 '22 00:09 dhruvinsh

Would we need to install a bunch of individual "apps" (containers) one by one to get this working on unraid without docker-compose? It looks like there's 7 containers, is that right?

I'm hesitant to use compose on unraid as it doesn't play well with their Web UI and that is my primary interface to the server.

ark- avatar Sep 03 '22 19:09 ark-

Currently, yes, you would need to set up the individual containers manually. For Redis and Postgres you could use templates, and the machine-learning container is not required (but you would miss out on object detection/tagging).

bo0tzz avatar Sep 03 '22 20:09 bo0tzz

I got this working by installing the unraid plugin for docker-compose. This is an OK workaround for now, but it makes a bunch of unmanaged containers in the main docker window.

  1. Install docker compose manager from the app store
  2. Add a new "stack" (find the button at the bottom of the docker tab) and call it "immich"
  3. Edit the docker compose of the immich stack pasting in the contents docker/docker-compose.yml and save changes
  4. Edit the environment of the immich stack pasting in the contents docker/.env, editing to suit your environment and save changes
  5. Click the "Docker Up" button for the stack

Enjoy

ark- avatar Sep 08 '22 15:09 ark-

I got this working by installing the unraid plugin for docker-compose

Yeah, It works but is not ideal for many unraid users.

martabal avatar Sep 08 '22 15:09 martabal

Maybe we should also post here : https://discourse.linuxserver.io/t/request-immich/4482/2

Linuxserver's team would be a BIG step for Immich integration on Unraid and it would offer a really big visibility IMO.

guim31 avatar Sep 08 '22 15:09 guim31

Yeah Linuxserver's work is amazing, I hope they will create an Immich image. Btw, this issue doesn't appear in the Kanban. Hope this isn't a bad thing.

martabal avatar Sep 08 '22 15:09 martabal