Skip to content

Commit

Permalink
chore: Simplify install script (#8048)
Browse files Browse the repository at this point in the history
* chore: Simplify install script

The default .env file now contains a set UPLOAD_LOCATION already

* fix: Remove leftover line
  • Loading branch information
bo0tzz committed Mar 18, 2024
1 parent 40262c3 commit 1a25545
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions install.sh
Expand Up @@ -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
}

Expand All @@ -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"

Expand All @@ -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.
Expand All @@ -75,5 +59,4 @@ show_friendly_message() {
create_immich_directory
download_docker_compose_file
download_dot_env_file
populate_upload_location
start_docker_compose

0 comments on commit 1a25545

Please sign in to comment.