From 5b22df5c8ed640ee3c3ae99aeba23139c9107bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sun, 20 Oct 2024 02:22:35 +0200 Subject: [PATCH] Add new LXC: Neo4j (#3932) --- ct/neo4j.sh | 72 ++++++++++++++++++++++++++++++++++++++++ install/neo4j-install.sh | 39 ++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 ct/neo4j.sh create mode 100644 install/neo4j-install.sh diff --git a/ct/neo4j.sh b/ct/neo4j.sh new file mode 100644 index 00000000..123625d5 --- /dev/null +++ b/ct/neo4j.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ __ _ + / | / /__ ____ / // / (_) + / |/ / _ \/ __ \/ // /_/ / + / /| / __/ /_/ /__ __/ / +/_/ |_/\___/\____/ /_/_/ / + /___/ +EOF +} +header_info +echo -e "Loading..." +APP="Neo4j" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /etc/neo4j ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Browser should be reachable by going to the following URL. + ${BL}http://${IP}:7474${CL} \n" diff --git a/install/neo4j-install.sh b/install/neo4j-install.sh new file mode 100644 index 00000000..f5e8b867 --- /dev/null +++ b/install/neo4j-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing Neo4j (patience)" +wget -qO- https://debian.neo4j.com/neotechnology.gpg.key | gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg +echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' > /etc/apt/sources.list.d/neo4j.list +$STD apt-get update +$STD apt-get install -y neo4j +sed -i '/server.default_listen_address/s/^#//' /etc/neo4j/neo4j.conf +systemctl enable -q --now neo4j +msg_ok "Installed Neo4j" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"