summarylogtreecommitdiffstats
path: root/immich-server.install
blob: 282759251491d06da5c9cba430b811a7610bc3d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pre_install() {
    :
}

post_install() {
    echo -e "\033[1;34mINFO\033[0m\033[1m: Final steps to have a working immich instance:"
    echo -e "\033[1;34mINFO\033[0m\033[1m:     * add vectorchord extension to postgres using \`sudo -u postgres psql -c 'ALTER SYSTEM SET shared_preload_libraries = \"vchord.so\"'\`. Restart of postgres service required.\033[0m"
    echo -e "\033[1;34mINFO\033[0m\033[1m:     * initialise postgres and create a database called 'immich' (https://wiki.archlinux.org/title/PostgreSQL)\033[0m"
    echo -e "\033[1;34mINFO\033[0m\033[1m:     * enable an nginx config then start nginx.service, an example that servers immich on port 8080 is given at /usr/share/doc/immich/examples/nginx.conf\033[0m"
    echo -e "\033[1;34mINFO\033[0m\033[1m:     * ensure immich-server resolves to 127.0.0.1 and/or ::1, e.g. through /etc/hosts\033[0m"
    echo -e "\033[1;34mINFO\033[0m\033[1m:     * start/enable immich-server.service (and immich-machine-learning.service if installed)\033[0m"
    echo -e "\033[1;34mINFO\033[0m\033[1m:     * make sure firewall allows traffic through port 2283 ONLY ON SECURE NETWORKS\033[0m"
}

pre_upgrade() {
	:
}

post_upgrade() {
    if [ "$(printf '%s\n' "$2" "1.133.1" | sort -V | tail -n1)" = "1.133.1" ]; then
        echo -e "\033[1;33mIMPORTANT\033[0m\033[1m: Newer versions of immich server have deprecated pgvecto.rs in favor of vectorchord."
        echo -e "\tPlease follow the *manual* migration steps at https://immich.app/docs/administration/postgres-standalone/#migrating-to-vectorchord."
    fi
    if [ "$(printf '%s\n' "$2" "1.142.0" | sort -V | tail -n1)" = "1.142.0" ]; then
        echo -e "\033[1;33mIMPORTANT\033[0m\033[1m: immich-machine-learning is now packaged separately. It is required for features such as smart search, duplicate detection, and facial recognition."
        echo -e "\tInstall and enable immich-machine-learning to continue using these features."
    fi
}

pre_remove() {
    :
}

post_remove() {
    :
}