mirror of
https://github.com/CoolnsX/selfhost_podman.git
synced 2025-12-20 03:45:16 +05:30
Feat: Immich Server
This commit is contained in:
20
immich/env.example
Normal file
20
immich/env.example
Normal file
@@ -0,0 +1,20 @@
|
||||
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
|
||||
|
||||
# The location where your uploaded files are stored
|
||||
UPLOAD_LOCATION=/path/to/storage
|
||||
|
||||
# List of comma-separated IPs set as trusted proxies
|
||||
IMMICH_TRUSTED_PROXIES=100.100.100.1
|
||||
|
||||
# Redis
|
||||
REDIS_SOCKET=/tmp/immich/valkey.sock
|
||||
|
||||
# Postgres
|
||||
DB_URL=postgresql://postgres:CHANGEMEASAP@localhost/immich?host=/tmp/immich/
|
||||
|
||||
DB_PASSWORD=CHANGEMEASAP
|
||||
|
||||
# The values below this line do not need to be changed
|
||||
###################################################################################
|
||||
DB_USERNAME=postgres
|
||||
DB_DATABASE_NAME=immich
|
||||
31
immich/immich.container
Normal file
31
immich/immich.container
Normal file
@@ -0,0 +1,31 @@
|
||||
[Unit]
|
||||
Description=Immich Container
|
||||
Requires=immich_db.service immich_valkey.service
|
||||
After=immich_db.service immich_valkey.service
|
||||
|
||||
[Container]
|
||||
Pod=immich.pod
|
||||
ContainerName=immich
|
||||
Image=ghcr.io/immich-app/immich-server:release
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
# pass this to attach it to container
|
||||
EnvironmentFile=./.env
|
||||
|
||||
Volume=${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||
Volume=/etc/localtime:/etc/localtime:ro
|
||||
|
||||
# gpu acceleration
|
||||
AddDevice=/dev/dri
|
||||
GroupAdd=989
|
||||
|
||||
[Service]
|
||||
# pass this to autofill above variables
|
||||
EnvironmentFile=%h/.config/containers/systemd/immich/.env
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
12
immich/immich.pod
Normal file
12
immich/immich.pod
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Immich Pod
|
||||
|
||||
[Pod]
|
||||
PodName=immich
|
||||
#PublishPort=2283:2283
|
||||
Network=host
|
||||
Volume=%h/podman/immich/.socket:/tmp/immich
|
||||
|
||||
# to satisfy immich bitch permissions problems
|
||||
UIDMap=1000:0:1
|
||||
UIDMap=0:1:1000
|
||||
28
immich/immich_db.container
Normal file
28
immich/immich_db.container
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=Immich Database Container
|
||||
|
||||
[Container]
|
||||
Pod=immich.pod
|
||||
ContainerName=immich_db
|
||||
Image=ghcr.io/immich-app/postgres:17-vectorchord0.4.3
|
||||
Exec=postgres -c shared_preload_libraries=vchord -c unix_socket_directories='/var/run/postgresql/,/tmp/immich/' -c unix_socket_permissions=0770 -c shared_buffers=2GB -c work_mem=64MB -c effective_cache_size=4GB
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
# pass this to attach it to container
|
||||
Environment=POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
Environment=POSTGRES_USER=${DB_USERNAME}
|
||||
Environment=POSTGRES_DB=${DB_DATABASE_NAME}
|
||||
Environment=POSTGRES_INITDB_ARGS=--data-checksums
|
||||
|
||||
Volume=%h/podman/immich/database:/var/lib/postgresql/data
|
||||
|
||||
[Service]
|
||||
# pass this to autofill above variables
|
||||
EnvironmentFile=%h/.config/containers/systemd/immich/.env
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
28
immich/immich_ml.container
Normal file
28
immich/immich_ml.container
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=Immich Machine Learning Container
|
||||
|
||||
[Container]
|
||||
Pod=immich.pod
|
||||
ContainerName=immich_ml
|
||||
Image=ghcr.io/immich-app/immich-machine-learning:release
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
# pass this to attach it to container
|
||||
EnvironmentFile=./.env
|
||||
|
||||
Volume=%h/podman/immich/ml:/cache
|
||||
|
||||
# gpu acceleration
|
||||
AddDevice=/dev/dri
|
||||
GroupAdd=989
|
||||
|
||||
[Service]
|
||||
# pass this to autofill above variables
|
||||
EnvironmentFile=%h/.config/containers/systemd/immich/.env
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
19
immich/immich_valkey.container
Normal file
19
immich/immich_valkey.container
Normal file
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Immich Valkey Container
|
||||
|
||||
[Container]
|
||||
Pod=immich.pod
|
||||
ContainerName=immich_valkey
|
||||
Image=docker.io/valkey/valkey:alpine
|
||||
Exec=--unixsocket /tmp/immich/valkey.sock --unixsocketperm 777
|
||||
|
||||
# Enable auto-update container
|
||||
AutoUpdate=registry
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
13
immich/readme.md
Normal file
13
immich/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Immich
|
||||
|
||||
- make required directory
|
||||
```sh
|
||||
mkdir ~/podman/immich/{ml,database}
|
||||
mkdir ${UPLOAD_LOCATION}
|
||||
```
|
||||
|
||||
- copy and modify env.example to .env
|
||||
- change the URL for machine learning container in settings
|
||||
|
||||
## Major Problem
|
||||
- none
|
||||
Reference in New Issue
Block a user