1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00:00

chore: Simplify install script (#8048)

* chore: Simplify install script

The default .env file now contains a set UPLOAD_LOCATION already

* fix: Remove leftover line
This commit is contained in:
bo0tzz 2024-03-18 22:54:30 +01:00 committed by GitHub
parent 40262c30cb
commit 1a2554548a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ ip_address=$(hostname -I | awk '{print $1}')
create_immich_directory() {
echo "Creating Immich directory..."
mkdir -p ./immich-app/immich-data
mkdir -p ./immich-app
cd ./immich-app || exit
}
@ -20,21 +20,6 @@ download_dot_env_file() {
curl -L https://github.com/immich-app/immich/releases/latest/download/example.env -o ./.env >/dev/null 2>&1
}
replace_env_value() {
KERNEL="$(uname -s | tr '[:upper:]' '[:lower:]')"
if [ "$KERNEL" = "darwin" ]; then
sed -i '' "s|$1=.*|$1=$2|" ./.env
else
sed -i "s|$1=.*|$1=$2|" ./.env
fi
}
populate_upload_location() {
echo "Populating default UPLOAD_LOCATION value..."
upload_location=$(pwd)/immich-data
replace_env_value "UPLOAD_LOCATION" "$upload_location"
}
start_docker_compose() {
echo "Starting Immich's docker containers"
@ -59,7 +44,6 @@ start_docker_compose() {
show_friendly_message() {
echo "Successfully deployed Immich!"
echo "You can access the website at http://$ip_address:2283 and the server URL for the mobile app is http://$ip_address:2283/api"
echo "The library location is $upload_location"
echo "---------------------------------------------------"
echo "If you want to configure custom information of the server, including the database, Redis information, or the backup (or upload) location, etc.
@ -75,5 +59,4 @@ show_friendly_message() {
create_immich_directory
download_docker_compose_file
download_dot_env_file
populate_upload_location
start_docker_compose