appstore-1panel/apps/immich/1.112.1/docker-compose.yml

84 lines
2.9 KiB
YAML
Raw Normal View History

networks:
1panel-network:
external: true
name: immich
services:
immich-pg14-vectors:
image: tensorchord/pgvecto-rs:pg14-v0.2.0
container_name: pg14-vectors-${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_DB:-5432}:5432
volumes:
- ${IMMICH_ROOT_PATH}/pg14/data:/var/lib/postgresql/data
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" ]
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME:-postgres}
POSTGRES_DB: ${DB_DATABASE_NAME:-immich}
POSTGRES_INITDB_ARGS: '--data-checksums'
immich-machine-learning:
2024-08-17 17:07:36 +08:00
image: ghcr.io/immich-app/immich-machine-learning:v1.112.1
container_name: immich-machine-learning-${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
devices:
- /dev/dri:/dev/dri
# - /dev/nvidia0:/dev/nvidia0
# - /dev/nvidiactl:/dev/nvidiactl
# - /dev/nvidia-modeset:/dev/nvidia-modeset
# - /dev/nvidia-nvswitchctl:/dev/nvidia-nvswitchctl
# - /dev/nvidia-uvm:/dev/nvidia-uvm
# - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
# - /dev/video11:/dev/video11
ports:
- ${PANEL_APP_PORT_MACHINE_LEARNING}:3003
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${IMMICH_ROOT_PATH}/data/cache:/cache
immich-server:
depends_on:
- immich-pg14-vectors
2024-08-17 17:07:36 +08:00
image: ghcr.io/immich-app/immich-server:v1.112.1
container_name: immich-server-${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
devices:
- /dev/dri:/dev/dri
# - /dev/nvidia0:/dev/nvidia0
# - /dev/nvidiactl:/dev/nvidiactl
# - /dev/nvidia-modeset:/dev/nvidia-modeset
# - /dev/nvidia-nvswitchctl:/dev/nvidia-nvswitchctl
# - /dev/nvidia-uvm:/dev/nvidia-uvm
# - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
# - /dev/video11:/dev/video11
ports:
- ${PANEL_APP_PORT_HTTP}:3001
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${IMMICH_ROOT_PATH}/data/library:/usr/src/app/upload
- /etc/localtime:/etc/localtime