71 lines
2.1 KiB
Bash
Executable File
71 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
# Exposed on port 3001 in pew-net
|
|
docker run \
|
|
--detach \
|
|
--name immich-server \
|
|
--restart unless-stopped \
|
|
--env DB_DATABASE_NAME=immich_db \
|
|
--env DB_HOSTNAME=immich-pg \
|
|
--env DB_USERNAME=immich_user \
|
|
--env DB_PASSWORD=immich_pw \
|
|
--env IMMICH_MACHINE_LEARNING_URL=http://immich-ml:3003 \
|
|
--env REDIS_HOSTNAME=immich-redis \
|
|
--volume /mammoth/immich/upload:/usr/src/app/upload:rw \
|
|
--volume /mammoth/photos:/external_library/photos:ro \
|
|
--volume /etc/localtime:/etc/localtime:ro \
|
|
--network pew-net \
|
|
ghcr.io/immich-app/immich-server:v1.116.2
|
|
|
|
docker run \
|
|
--detach \
|
|
--name immich-ml \
|
|
--restart unless-stopped \
|
|
--env DB_DATABASE_NAME=immich_db \
|
|
--env DB_HOSTNAME=immich-pg \
|
|
--env DB_USERNAME=immich_user \
|
|
--env DB_PASSWORD=immich_pw \
|
|
--env IMMICH_MACHINE_LEARNING_URL=http://immich-ml:3003 \
|
|
--env REDIS_HOSTNAME=immich-redis \
|
|
--volume /mammoth/immich/cache:/cache:rw \
|
|
--network pew-net \
|
|
ghcr.io/immich-app/immich-machine-learning:v1.116.2
|
|
|
|
docker run \
|
|
--detach \
|
|
--name immich-redis \
|
|
--restart unless-stopped \
|
|
--network pew-net \
|
|
docker.io/redis:6
|
|
|
|
docker run \
|
|
--detach \
|
|
--name immich-pg \
|
|
--restart unless-stopped \
|
|
--env POSTGRES_PASSWORD=immich_pw \
|
|
--env POSTGRES_USER=immich_user \
|
|
--env POSTGRES_DB=immich_db \
|
|
--env POSTGRES_INITDB_ARGS=--data-checksums \
|
|
--volume /mammoth/immich/postgres:/var/lib/postgresql/data:rw \
|
|
--network pew-net \
|
|
docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 \
|
|
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
|
|
}
|
|
|
|
|
|
down () {
|
|
docker stop immich-server || true
|
|
docker rm immich-server || true
|
|
docker stop immich-ml || true
|
|
docker rm immich-ml || true
|
|
docker stop immich-redis || true
|
|
docker rm immich-redis || true
|
|
docker stop immich-pg || true
|
|
docker rm immich-pg || true
|
|
}
|
|
|
|
$@
|