After many attemps
This commit is contained in:
53
home/podman/.config/containers/systemd/immich-db.container
Normal file
53
home/podman/.config/containers/systemd/immich-db.container
Normal file
@ -0,0 +1,53 @@
|
||||
[Container]
|
||||
AutoUpdate=registry
|
||||
ContainerName=immich-db
|
||||
Environment="POSTGRES_DB=immich"
|
||||
Environment="POSTGRES_INITDB_ARGS=--data-checksums"
|
||||
Environment="POSTGRES_PASSWORD=postgres"
|
||||
Environment="POSTGRES_USER=postgres"
|
||||
Image=docker.io/library/postgres:16
|
||||
# Network=immich.network
|
||||
# Pod=immich.pod
|
||||
PublishPort=5432:5432
|
||||
Volume=immich-db-data.volume:/var/lib/postgresql/data:Z
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target default.target
|
||||
|
||||
# healthcheck:
|
||||
# test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql
|
||||
# --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only
|
||||
# --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM
|
||||
# pg_stat_database')"; echo "checksum failure count is $$Chksum"; [
|
||||
# "$$Chksum" = '0' ] || exit 1
|
||||
# interval: 5m
|
||||
# start_interval: 30s
|
||||
# start_period: 5m
|
||||
# command:
|
||||
# - postgres
|
||||
# - -c
|
||||
# - shared_preload_libraries=vectors.so
|
||||
# - -c
|
||||
# - search_path="$$user", public, vectors
|
||||
# - -c
|
||||
# - logging_collector=on
|
||||
# - -c
|
||||
# - max_wal_size=2GB
|
||||
# - -c
|
||||
# - shared_buffers=512MB
|
||||
# - -c
|
||||
# - wal_compression=on
|
||||
|
||||
# podman pull docker.io/library/postgres:16
|
||||
# systemctl --user daemon-reload
|
||||
# systemctl --user start immich-db
|
||||
# systemctl --user status immich-db
|
||||
# journalctl -fu immich-db.service
|
||||
# podman logs immich-db
|
||||
# systemctl --user stop immich-db
|
||||
# systemctl --user disable immich-db
|
||||
# podman exec -ti immich-db /bin/sh
|
||||
# podman exec -ti immich-db /bin/bash
|
Reference in New Issue
Block a user