Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update install.sh to write version to docker-compose to ensure we pull and run the right containers (#434)
Leendert de Borst968d3cfcf198
diff --git a/install.sh b/install.shindex 92513fc06..d4a2dae81 100755--- a/install.sh+++ b/install.sh@@ -234,13 +234,24 @@ handle_docker_compose() {# Check and download main docker-compose.ymlif [ ! -f "docker-compose.yml" ]; thenprintf " ${CYAN}> Downloading docker-compose.yml...${NC}"- if curl -sSf "${GITHUB_RAW_URL}/docker-compose.yml" -o "docker-compose.yml" > /dev/null 2>&1; then+ if curl -sSf "${GITHUB_RAW_URL}/docker-compose.yml" -o "docker-compose.yml.tmp" > /dev/null 2>&1; then+ # Replace the :latest tag with the specific version if provided+ if [ -n "$1" ] && [ "$1" != "latest" ]; then+ sed "s/:latest/:$1/g" docker-compose.yml.tmp > docker-compose.yml+ rm docker-compose.yml.tmp+ else+ mv docker-compose.yml.tmp docker-compose.yml+ fiprintf "\n ${GREEN}> docker-compose.yml downloaded successfully.${NC}\n"elseprintf "\n ${YELLOW}> Failed to download docker-compose.yml, please check your internet connection and try again. Alternatively, you can download it manually from https://github.com/${REPO_OWNER}/${REPO_NAME}/blob/main/docker-compose.yml and place it in the root directory of AliasVault.${NC}\n"exit 1fielse+ # Update existing docker-compose.yml with correct version if provided+ if [ -n "$1" ] && [ "$1" != "latest" ]; then+ sed -i.bak "s/:latest/:$1/g" docker-compose.yml && rm -f docker-compose.yml.bak+ fiprintf " ${GREEN}> docker-compose.yml already exists.${NC}\n"fi@@ -1206,6 +1217,9 @@ handle_install_version() {# Initialize workspace which makes sure all required directories and files existinitialize_workspace+ # Update docker-compose files with correct version so we pull the correct images+ handle_docker_compose "$target_version"+# Initialize environmentcreate_env_file || { printf "${RED}> Failed to create .env file${NC}\n"; exit 1; }populate_hostname || { printf "${RED}> Failed to set hostname${NC}\n"; exit 1; }