-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Support native deployments (without docker, includes example) #734
Comments
Thank you for this. Really appreciate the work you put into sorting this out. For anyone wanting to deploy on OpenSUSE Tumbleweed/MicroOS here are some pointers. DependenciesFor building
For hosting
SELinuxAllow local nginx proxy to connect to local services via port
NginxGrab the config from this repository and modify to your needs. |
Nice work. |
Thanks a lot. |
(off topic)
https://github.com/hydazz/docker-immich edit: all seems to be working in latest commit... |
Thank you for the contribution. I have a thought about your hashtag #appsshouldbeasignecontainerwhereapplicable Let's say you want to limit the CPU of |
Yes, that's not really possible on a single container - there are indeed use cases for having the containers separated on lower-powered hardware. Most self-hosted image services have single containers which makes deployment much easier on specific OSes (ie Unraid), where most users won't even think about limiting the CPU of a container. |
You could try to start the container with the https://docs.docker.com/config/containers/resource_constraints/#configure-individual-containers Pair that with e.g dumb-init: |
there should be a way to achieve this with s6 and s6-overlay Why does the machine-learning module spawn 40+ processes that use up over 1GB of ram at idle? is this necessary? is it possible to have the machine-learning run on-demand rather than all the time? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Feature detail
Thanks for the great app! One thing that I'm dearly missing is the ability to deploy this on bare-metal, without relying on docker. The problem is that in certain situations, docker might not be a viable option to deploy a project. I for example am using an extremely strict nftables firewall, for which docker simply has no compatibility (and docker will likely still take some years to catch up). Furthermore, I deploy each application in its own KVM virtual machine with libvirt, so docker would just be an unnecessary overhead for me.
I have already managed to get immich running without docker just fine, it would just be missing a tiny bit of packaging to make the process more accessible and repeatable. I've attached my scripts to build and deploy immich below in case you (or any other people stumbling over this) are interested.
Installing on bare-metal
/var/lib/immich
)/var/lib/immich/env
(adapt from upstream provided.env.example
)runuser -u immich -- ./build.sh
127.0.0.1 localhost immich-server immich-microservices immich-machine-learning immich-web
/the/backup/folder/you/want
to/var/lib/immich/upload
The need to map the upload folder in several app directories is a little clunky right now, just like having to use /etc/hosts because hostnames are hardcoded. But the rest is working like a charm without docker.
You might need to change the systemd services a little to fit your system if e.g. your postgresql service is not called
postgresql-14.service
, or when it is running on another system. I've also used systemd to do sandboxing for the services, so they will not be able to access other directories if you need that for some reason.Buildscript
build.sh
This script is adapted from the Dockerfiles I found in this repo.
Systemd service
immich-server.service
Systemd service
immich-microservices.service
Systemd service
immich-machine-learning.service
Systemd service
immich-web.service
P.S.: Is it intended that compiling the most recent release with npm reports 10+ high and 3 critical security issues? Not sure what to do about that as a user.
Platform
Server
The text was updated successfully, but these errors were encountered: