diff --git a/ct/domain-locker.sh b/ct/domain-locker.sh new file mode 100644 index 000000000..a693ca202 --- /dev/null +++ b/ct/domain-locker.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Lissy93/domain-locker + +APP="Domain-Locker" +var_tags="${var_tags:-Monitoring}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-10240}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/domain-locker ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "domain-locker" "Lissy93/domain-locker"; then + msg_info "Stopping Service" + systemctl stop domain-locker + msg_info "Service stopped" + + PG_VERSION="17" setup_postgresql + setup_nodejs + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker" + + msg_info "Installing Modules (patience)" + cd /opt/domain-locker + $STD npm install + msg_ok "Installed Modules" + + msg_info "Building Domain-Locker (a lot of patience)" + npm install + set -a + source /opt/domain-locker.env + set +a + $STD npm run build + msg_info "Built Domain-Locker" + + msg_info "Restarting Services" + systemctl start domain-locker + msg_ok "Restarted Services" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/headers/domain-locker b/ct/headers/domain-locker new file mode 100644 index 000000000..0ab1a9b74 --- /dev/null +++ b/ct/headers/domain-locker @@ -0,0 +1,6 @@ + ____ _ __ __ + / __ \____ ____ ___ ____ _(_)___ / / ____ _____/ /_____ _____ + / / / / __ \/ __ `__ \/ __ `/ / __ \______/ / / __ \/ ___/ //_/ _ \/ ___/ + / /_/ / /_/ / / / / / / /_/ / / / / /_____/ /___/ /_/ / /__/ ,< / __/ / +/_____/\____/_/ /_/ /_/\__,_/_/_/ /_/ /_____/\____/\___/_/|_|\___/_/ + diff --git a/frontend/public/json/domain-locker.json b/frontend/public/json/domain-locker.json new file mode 100644 index 000000000..9a9260903 --- /dev/null +++ b/frontend/public/json/domain-locker.json @@ -0,0 +1,44 @@ +{ + "name": "Domain Locker", + "slug": "domain-locker", + "categories": [ + 9 + ], + "date_created": "2025-11-10", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://domain-locker.com/about", + "config_path": "/opt/domain-locker.env", + "website": "https://github.com/Lissy93/domain-locker", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/domain-locker.webp", + "description": "The all-in-one tool, for keeping track of your domain name portfolio. Got domain names? Get Domain Locker! ", + "install_methods": [ + { + "type": "default", + "script": "ct/domain-locker.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Show DB credentials: `cat ~/Domain-Locker.creds`", + "type": "info" + }, + { + "text": "Domain-locker takes quite some time to build and a lot of ressources, RAM and Cores can be lowered after install.", + "type": "info" + } + ] +} diff --git a/install/domain-locker-install.sh b/install/domain-locker-install.sh new file mode 100644 index 000000000..b3fba6d32 --- /dev/null +++ b/install/domain-locker-install.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/CrazyWolf13/domain-locker + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +PG_VERSION="17" setup_postgresql +PG_DB_NAME="domainlocker" PG_DB_USER="domainlocker" setup_postgresql_db +NODE_VERSION="22" setup_nodejs + +fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker" + +msg_info "Installing Modules (patience)" +cd /opt/domain-locker +$STD npm install +msg_ok "Installed Modules" + +msg_info "Building Domain-Locker (a lot of patience)" +cat </opt/domain-locker.env +# Database connection +DL_PG_HOST=localhost +DL_PG_PORT=5432 +DL_PG_USER=$PG_DB_USER +DL_PG_PASSWORD=$PG_DB_PASS +DL_PG_NAME=$PG_DB_NAME + +# Build + Runtime +DL_ENV_TYPE=selfHosted +NITRO_PRESET=node_server +NODE_ENV=production +EOF +set -a +source /opt/domain-locker.env +set +a +$STD npm run build +msg_info "Built Domain-Locker" + +msg_info "Building Database schema" +export PGPASSWORD="$DL_PG_PASSWORD" +$STD psql -h "$DL_PG_HOST" -p "$DL_PG_PORT" -U "$DL_PG_USER" -d "$DL_PG_NAME" -f "/opt/domain-locker/db/schema.sql" +msg_ok "Built Database schema" + +msg_info "Creating Service" +cat </etc/systemd/system/domain-locker.service +[Unit] +Description=Domain-Locker Service +After=network.target + +[Service] +EnvironmentFile=/opt/domain-locker.env +WorkingDirectory=/opt/domain-locker +ExecStart=/opt/domain-locker/start.sh +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl start --now -q domain-locker +msg_info "Created Service" + +motd_ssh +customize +cleanup_lxc