mirror of
https://github.com/CoolnsX/selfhost_podman.git
synced 2025-12-20 03:45:16 +05:30
29 lines
871 B
Plaintext
29 lines
871 B
Plaintext
[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
|
|
|