I am following:
daemonless.io
I had immich running on podman and want to migrate it to a native appjail for perhaps marginally better performance and integration with FreeBSD.
That said, I had to deviate from the configuration because it for whatever reason isn't working and still isn't working for me:
.env:
Makejail:
appjail-director.yml:
run.sh:
I am removing any env variables from appjail-directory.yml because it seems like for whatever reason, they're not being picked up. I suspect that is why provisioning is failing.
Immich Stack on FreeBSD: Native Photo Management using Podman & Jails - daemonless
Deploy the complete Immich photo management stack on FreeBSD natively using Podman and Daemonless. Self-hosted Google Photos alternative with facial recognition and machine learning.
I had immich running on podman and want to migrate it to a native appjail for perhaps marginally better performance and integration with FreeBSD.
That said, I had to deviate from the configuration because it for whatever reason isn't working and still isn't working for me:
.env:
Code:
UPLOAD_LOCATION=/media/immich/app-jail/app_data
DB_DATA_LOCATION=/media/immich/app-jail/postgres
CACHE_LOCATION=/media/immich/app-jail/cache
REDIS_DATA_LOCATION=/media/immich/app-jail/redis
TZ=Etc/UTC
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich
DIRECTOR_PROJECT=immich
Makejail:
Code:
OPTION container=boot args:--pull
OPTION overwrite=force
appjail-director.yml:
Code:
options:
- alias:
- ip4_inherit:
services:
immich-server:
name: immich_server
priority: 100
options:
- from: ghcr.io/daemonless/immich-server:latest
volumes:
- immich-data: /data
oci:
environment:
- DB_HOSTNAME: 127.0.0.1
- DB_USERNAME: ${DB_USERNAME}
- DB_PASSWORD: ${DB_PASSWORD}
- REDIS_HOSTNAME: 127.0.0.1
- IMMICH_MACHINE_LEARNING_URL: [URL]http://127.0.0.1:3003[/URL]
- TZ: ${TZ}
immich-machine-learning:
name: immich_machine_learning
options:
- from: ghcr.io/daemonless/immich-ml:latest
oci:
environment:
- HF_HOME: /cache/huggingface
- MPLCONFIGDIR: /tmp
- TZ: ${TZ}
volumes:
- model-cache: /cache
redis:
name: immich_redis
options:
- from: ghcr.io/daemonless/redis:latest
oci:
environment:
- LANG: C.UTF-8
- TZ: ${TZ}
volumes:
- redis-data: /config
database:
name: immich_postgres
options:
- from: ghcr.io/daemonless/immich-postgres:latest
- template: immich-postgres-template.conf
oci:
environment:
- POSTGRES_PASSWORD: ${DB_PASSWORD}
- POSTGRES_USER: ${DB_USERNAME}
- POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- db-data: /var/lib/postgresql/data
volumes:
immich-data:
device: ${UPLOAD_LOCATION}
model-cache:
device: /media/immich/app-jail/cache
redis-data:
device: /media/immich/app-jail/redis
db-data:
device: /media/immich/app-jail/postgres
run.sh:
Code:
#!/bin/sh
. .env
# Set required environment variables for AppJail
export DB_USERNAME DB_PASSWORD DB_DATABASE_NAME TZ \
UPLOAD_LOCATION CACHE_LOCATION REDIS_DATA_LOCATION DB_DATA_LOCATION
# Create directories and assign ownership to UID 1000 (standard OCI non-root user)
mkdir -p "$UPLOAD_LOCATION" "$CACHE_LOCATION" "$REDIS_DATA_LOCATION" "$DB_DATA_LOCATION"
chown -R 1000:1000 /media/immich/app-jail
# Bring up the environment
appjail-director up
I am removing any env variables from appjail-directory.yml because it seems like for whatever reason, they're not being picked up. I suspect that is why provisioning is failing.